Re: [PATCH resend 5/9] drm/connector: Add a drm_connector privacy-screen helper functions
by kernel test robot
Hi Hans,
I love your patch! Yet something to improve:
[auto build test ERROR on drm-intel/for-linux-next]
[also build test ERROR on drm-tip/drm-tip linus/master v5.12-rc7 next-20210414]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Hans-de-Goede/drm-Add-privacy-sc...
base: git://anongit.freedesktop.org/drm-intel for-linux-next
config: i386-randconfig-a014-20210414 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/0day-ci/linux/commit/8cb16e16d419f6ea9da13b9826a2d1d7a...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Hans-de-Goede/drm-Add-privacy-screen-class-and-connector-properties/20210414-231316
git checkout 8cb16e16d419f6ea9da13b9826a2d1d7ad5a9819
# save the attached .config to linux build tree
make W=1 W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
ld: drivers/gpu/drm/drm_connector.o: in function `drm_connector_unregister':
>> drivers/gpu/drm/drm_connector.c:573: undefined reference to `drm_privacy_screen_unregister_notifier'
ld: drivers/gpu/drm/drm_connector.o: in function `drm_connector_update_privacy_screen_properties':
>> drivers/gpu/drm/drm_connector.c:2377: undefined reference to `drm_privacy_screen_get_state'
ld: drivers/gpu/drm/drm_connector.o: in function `drm_connector_register':
>> drivers/gpu/drm/drm_connector.c:541: undefined reference to `drm_privacy_screen_register_notifier'
ld: drivers/gpu/drm/drm_connector.o: in function `drm_connector_update_privacy_screen':
>> drivers/gpu/drm/drm_connector.c:2457: undefined reference to `drm_privacy_screen_set_sw_state'
ld: drivers/gpu/drm/drm_connector.o: in function `drm_connector_cleanup':
>> drivers/gpu/drm/drm_connector.c:457: undefined reference to `drm_privacy_screen_put'
vim +573 drivers/gpu/drm/drm_connector.c
437
438 /**
439 * drm_connector_cleanup - cleans up an initialised connector
440 * @connector: connector to cleanup
441 *
442 * Cleans up the connector but doesn't free the object.
443 */
444 void drm_connector_cleanup(struct drm_connector *connector)
445 {
446 struct drm_device *dev = connector->dev;
447 struct drm_display_mode *mode, *t;
448
449 /* The connector should have been removed from userspace long before
450 * it is finally destroyed.
451 */
452 if (WARN_ON(connector->registration_state ==
453 DRM_CONNECTOR_REGISTERED))
454 drm_connector_unregister(connector);
455
456 if (connector->privacy_screen) {
> 457 drm_privacy_screen_put(connector->privacy_screen);
458 connector->privacy_screen = NULL;
459 }
460
461 if (connector->tile_group) {
462 drm_mode_put_tile_group(dev, connector->tile_group);
463 connector->tile_group = NULL;
464 }
465
466 list_for_each_entry_safe(mode, t, &connector->probed_modes, head)
467 drm_mode_remove(connector, mode);
468
469 list_for_each_entry_safe(mode, t, &connector->modes, head)
470 drm_mode_remove(connector, mode);
471
472 ida_simple_remove(&drm_connector_enum_list[connector->connector_type].ida,
473 connector->connector_type_id);
474
475 ida_simple_remove(&dev->mode_config.connector_ida,
476 connector->index);
477
478 kfree(connector->display_info.bus_formats);
479 drm_mode_object_unregister(dev, &connector->base);
480 kfree(connector->name);
481 connector->name = NULL;
482 spin_lock_irq(&dev->mode_config.connector_list_lock);
483 list_del(&connector->head);
484 dev->mode_config.num_connector--;
485 spin_unlock_irq(&dev->mode_config.connector_list_lock);
486
487 WARN_ON(connector->state && !connector->funcs->atomic_destroy_state);
488 if (connector->state && connector->funcs->atomic_destroy_state)
489 connector->funcs->atomic_destroy_state(connector,
490 connector->state);
491
492 mutex_destroy(&connector->mutex);
493
494 memset(connector, 0, sizeof(*connector));
495 }
496 EXPORT_SYMBOL(drm_connector_cleanup);
497
498 /**
499 * drm_connector_register - register a connector
500 * @connector: the connector to register
501 *
502 * Register userspace interfaces for a connector. Only call this for connectors
503 * which can be hotplugged after drm_dev_register() has been called already,
504 * e.g. DP MST connectors. All other connectors will be registered automatically
505 * when calling drm_dev_register().
506 *
507 * Returns:
508 * Zero on success, error code on failure.
509 */
510 int drm_connector_register(struct drm_connector *connector)
511 {
512 int ret = 0;
513
514 if (!connector->dev->registered)
515 return 0;
516
517 mutex_lock(&connector->mutex);
518 if (connector->registration_state != DRM_CONNECTOR_INITIALIZING)
519 goto unlock;
520
521 ret = drm_sysfs_connector_add(connector);
522 if (ret)
523 goto unlock;
524
525 drm_debugfs_connector_add(connector);
526
527 if (connector->funcs->late_register) {
528 ret = connector->funcs->late_register(connector);
529 if (ret)
530 goto err_debugfs;
531 }
532
533 drm_mode_object_register(connector->dev, &connector->base);
534
535 connector->registration_state = DRM_CONNECTOR_REGISTERED;
536
537 /* Let userspace know we have a new connector */
538 drm_sysfs_hotplug_event(connector->dev);
539
540 if (connector->privacy_screen)
> 541 drm_privacy_screen_register_notifier(connector->privacy_screen,
542 &connector->privacy_screen_notifier);
543
544 goto unlock;
545
546 err_debugfs:
547 drm_debugfs_connector_remove(connector);
548 drm_sysfs_connector_remove(connector);
549 unlock:
550 mutex_unlock(&connector->mutex);
551 return ret;
552 }
553 EXPORT_SYMBOL(drm_connector_register);
554
555 /**
556 * drm_connector_unregister - unregister a connector
557 * @connector: the connector to unregister
558 *
559 * Unregister userspace interfaces for a connector. Only call this for
560 * connectors which have registered explicitly by calling drm_dev_register(),
561 * since connectors are unregistered automatically when drm_dev_unregister() is
562 * called.
563 */
564 void drm_connector_unregister(struct drm_connector *connector)
565 {
566 mutex_lock(&connector->mutex);
567 if (connector->registration_state != DRM_CONNECTOR_REGISTERED) {
568 mutex_unlock(&connector->mutex);
569 return;
570 }
571
572 if (connector->privacy_screen)
> 573 drm_privacy_screen_unregister_notifier(
574 connector->privacy_screen,
575 &connector->privacy_screen_notifier);
576
577 if (connector->funcs->early_unregister)
578 connector->funcs->early_unregister(connector);
579
580 drm_sysfs_connector_remove(connector);
581 drm_debugfs_connector_remove(connector);
582
583 connector->registration_state = DRM_CONNECTOR_UNREGISTERED;
584 mutex_unlock(&connector->mutex);
585 }
586 EXPORT_SYMBOL(drm_connector_unregister);
587
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
[bvanassche:scsi-for-next 41/41] drivers/scsi/ibmvscsi/ibmvfc.c:1947:20: error: incompatible types when assigning to type 'union scsi_status' from type 'int'
by kernel test robot
tree: https://github.com/bvanassche/linux scsi-for-next
head: d8044d773ae9d9e70f9c61f98296c6c8391447ad
commit: d8044d773ae9d9e70f9c61f98296c6c8391447ad [41/41] Change the return type of fc_remote_port_chkready() into union scsi_status
config: powerpc-allyesconfig (attached as .config)
compiler: powerpc64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/bvanassche/linux/commit/d8044d773ae9d9e70f9c61f98296c6...
git remote add bvanassche https://github.com/bvanassche/linux
git fetch --no-tags bvanassche scsi-for-next
git checkout d8044d773ae9d9e70f9c61f98296c6c8391447ad
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
drivers/scsi/ibmvscsi/ibmvfc.c: In function 'ibmvfc_get_err_result':
drivers/scsi/ibmvscsi/ibmvfc.c:348:52: error: request for member 'combined' in something not a structure or union
348 | return rsp->scsi_status | (cmd_status[err].result.combined << 16);
| ^
In file included from include/linux/kernel.h:10,
from include/linux/list.h:9,
from include/linux/module.h:12,
from drivers/scsi/ibmvscsi/ibmvfc.c:10:
drivers/scsi/ibmvscsi/ibmvfc.c: In function 'ibmvfc_queuecommand':
>> include/linux/compiler.h:78:40: error: wrong type argument to unary exclamation mark
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
drivers/scsi/ibmvscsi/ibmvfc.c:1916:6: note: in expansion of macro 'unlikely'
1916 | if (unlikely((rc = fc_remote_port_chkready(rport))) ||
| ^~~~~~~~
>> include/linux/compiler.h:78:40: error: wrong type argument to unary exclamation mark
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
drivers/scsi/ibmvscsi/ibmvfc.c:1917:6: note: in expansion of macro 'unlikely'
1917 | unlikely((rc = ibmvfc_host_chkready(vhost)))) {
| ^~~~~~~~
>> drivers/scsi/ibmvscsi/ibmvfc.c:1947:20: error: incompatible types when assigning to type 'union scsi_status' from type 'int'
1947 | if (likely(!(rc = ibmvfc_map_sg_data(cmnd, evt, vfc_cmd, vhost->dev))))
| ^~~~~~~~~~~~~~~~~~
include/linux/compiler.h:77:40: note: in definition of macro 'likely'
77 | # define likely(x) __builtin_expect(!!(x), 1)
| ^
>> drivers/scsi/ibmvscsi/ibmvfc.c:1951:9: error: invalid operands to binary == (have 'union scsi_status' and 'int')
1951 | if (rc == -ENOMEM)
| ^~
drivers/scsi/ibmvscsi/ibmvfc.c:1956:51: warning: format '%d' expects argument of type 'int', but argument 4 has type 'union scsi_status' [-Wformat=]
1956 | "Failed to map DMA buffer for command. rc=%d\n", rc);
| ~^ ~~
| | |
| int union scsi_status
In file included from include/linux/kernel.h:10,
from include/linux/list.h:9,
from include/linux/module.h:12,
from drivers/scsi/ibmvscsi/ibmvfc.c:10:
drivers/scsi/ibmvscsi/ibmvfc.c: In function 'ibmvfc_bsg_plogi':
>> drivers/scsi/ibmvscsi/ibmvfc.c:2071:21: error: incompatible types when assigning to type 'int' from type 'union scsi_status'
2071 | if (unlikely((rc = ibmvfc_host_chkready(vhost))))
| ^~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
drivers/scsi/ibmvscsi/ibmvfc.c: In function 'ibmvfc_bsg_request':
drivers/scsi/ibmvscsi/ibmvfc.c:2241:29: error: incompatible type for argument 2 of 'bsg_job_done'
2241 | bsg_job_done(job, bsg_reply->result,
| ~~~~~~~~~^~~~~~~~
| |
| union scsi_status
In file included from drivers/scsi/ibmvscsi/ibmvfc.c:21:
include/linux/bsg-lib.h:65:44: note: expected 'int' but argument is of type 'union scsi_status'
65 | void bsg_job_done(struct bsg_job *job, int result,
| ~~~~^~~~~~
drivers/scsi/ibmvscsi/ibmvfc.c: In function 'ibmvfc_slave_alloc':
>> drivers/scsi/ibmvscsi/ibmvfc.c:3308:13: error: invalid operands to binary || (have 'int' and 'union scsi_status')
3308 | if (!rport || fc_remote_port_chkready(rport))
| ~~~~~~ ^~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| int union scsi_status
vim +1947 drivers/scsi/ibmvscsi/ibmvfc.c
fad74a1be2dbea Tyrel Datwyler 2020-11-17 1895
072b91f9c6510d Brian King 2008-07-01 1896 /**
072b91f9c6510d Brian King 2008-07-01 1897 * ibmvfc_queuecommand - The queuecommand function of the scsi template
dd9c772971485d Lee Jones 2021-03-17 1898 * @shost: scsi host struct
072b91f9c6510d Brian King 2008-07-01 1899 * @cmnd: struct scsi_cmnd to be executed
072b91f9c6510d Brian King 2008-07-01 1900 *
072b91f9c6510d Brian King 2008-07-01 1901 * Returns:
072b91f9c6510d Brian King 2008-07-01 1902 * 0 on success / other on failure
072b91f9c6510d Brian King 2008-07-01 1903 **/
654080d02edb60 Tyrel Datwyler 2021-01-06 1904 static int ibmvfc_queuecommand(struct Scsi_Host *shost, struct scsi_cmnd *cmnd)
072b91f9c6510d Brian King 2008-07-01 1905 {
654080d02edb60 Tyrel Datwyler 2021-01-06 1906 struct ibmvfc_host *vhost = shost_priv(shost);
072b91f9c6510d Brian King 2008-07-01 1907 struct fc_rport *rport = starget_to_rport(scsi_target(cmnd->device));
072b91f9c6510d Brian King 2008-07-01 1908 struct ibmvfc_cmd *vfc_cmd;
5a9d16f71c264a Tyrel Datwyler 2020-11-17 1909 struct ibmvfc_fcp_cmd_iu *iu;
072b91f9c6510d Brian King 2008-07-01 1910 struct ibmvfc_event *evt;
cb72477be7290c Tyrel Datwyler 2021-01-14 1911 u32 tag_and_hwq = blk_mq_unique_tag(cmnd->request);
cb72477be7290c Tyrel Datwyler 2021-01-14 1912 u16 hwq = blk_mq_unique_tag_to_hwq(tag_and_hwq);
31750fbd7b6dec Tyrel Datwyler 2021-01-14 1913 u16 scsi_channel;
d8044d773ae9d9 Bart Van Assche 2021-04-13 1914 union scsi_status rc;
072b91f9c6510d Brian King 2008-07-01 1915
072b91f9c6510d Brian King 2008-07-01 1916 if (unlikely((rc = fc_remote_port_chkready(rport))) ||
072b91f9c6510d Brian King 2008-07-01 1917 unlikely((rc = ibmvfc_host_chkready(vhost)))) {
d8044d773ae9d9 Bart Van Assche 2021-04-13 1918 cmnd->result = rc;
654080d02edb60 Tyrel Datwyler 2021-01-06 1919 cmnd->scsi_done(cmnd);
072b91f9c6510d Brian King 2008-07-01 1920 return 0;
072b91f9c6510d Brian King 2008-07-01 1921 }
072b91f9c6510d Brian King 2008-07-01 1922
fd78f07ace9e37 Bart Van Assche 2021-04-09 1923 cmnd->result.combined = (DID_OK << 16);
31750fbd7b6dec Tyrel Datwyler 2021-01-14 1924 if (vhost->using_channels) {
31750fbd7b6dec Tyrel Datwyler 2021-01-14 1925 scsi_channel = hwq % vhost->scsi_scrqs.active_queues;
31750fbd7b6dec Tyrel Datwyler 2021-01-14 1926 evt = ibmvfc_get_event(&vhost->scsi_scrqs.scrqs[scsi_channel]);
31750fbd7b6dec Tyrel Datwyler 2021-01-14 1927 evt->hwq = hwq % vhost->scsi_scrqs.active_queues;
31750fbd7b6dec Tyrel Datwyler 2021-01-14 1928 } else
e4b26f3db86498 Tyrel Datwyler 2021-01-06 1929 evt = ibmvfc_get_event(&vhost->crq);
31750fbd7b6dec Tyrel Datwyler 2021-01-14 1930
072b91f9c6510d Brian King 2008-07-01 1931 ibmvfc_init_event(evt, ibmvfc_scsi_done, IBMVFC_CMD_FORMAT);
072b91f9c6510d Brian King 2008-07-01 1932 evt->cmnd = cmnd;
fad74a1be2dbea Tyrel Datwyler 2020-11-17 1933
fad74a1be2dbea Tyrel Datwyler 2020-11-17 1934 vfc_cmd = ibmvfc_init_vfc_cmd(evt, cmnd->device);
5a9d16f71c264a Tyrel Datwyler 2020-11-17 1935 iu = ibmvfc_get_fcp_iu(vhost, vfc_cmd);
fad74a1be2dbea Tyrel Datwyler 2020-11-17 1936
5a9d16f71c264a Tyrel Datwyler 2020-11-17 1937 iu->xfer_len = cpu_to_be32(scsi_bufflen(cmnd));
5a9d16f71c264a Tyrel Datwyler 2020-11-17 1938 memcpy(iu->cdb, cmnd->cmnd, cmnd->cmd_len);
072b91f9c6510d Brian King 2008-07-01 1939
5066863337afdb Christoph Hellwig 2014-10-30 1940 if (cmnd->flags & SCMD_TAGGED) {
5066863337afdb Christoph Hellwig 2014-10-30 1941 vfc_cmd->task_tag = cpu_to_be64(cmnd->tag);
5a9d16f71c264a Tyrel Datwyler 2020-11-17 1942 iu->pri_task_attr = IBMVFC_SIMPLE_TASK;
072b91f9c6510d Brian King 2008-07-01 1943 }
072b91f9c6510d Brian King 2008-07-01 1944
901d01c8e50c35 Tyrel Datwyler 2021-01-06 1945 vfc_cmd->correlation = cpu_to_be64((u64)evt);
2aa0102c668830 Tyrel Datwyler 2020-11-17 1946
072b91f9c6510d Brian King 2008-07-01 @1947 if (likely(!(rc = ibmvfc_map_sg_data(cmnd, evt, vfc_cmd, vhost->dev))))
072b91f9c6510d Brian King 2008-07-01 1948 return ibmvfc_send_event(evt, vhost, 0);
072b91f9c6510d Brian King 2008-07-01 1949
072b91f9c6510d Brian King 2008-07-01 1950 ibmvfc_free_event(evt);
072b91f9c6510d Brian King 2008-07-01 @1951 if (rc == -ENOMEM)
072b91f9c6510d Brian King 2008-07-01 1952 return SCSI_MLQUEUE_HOST_BUSY;
072b91f9c6510d Brian King 2008-07-01 1953
072b91f9c6510d Brian King 2008-07-01 1954 if (vhost->log_level > IBMVFC_DEFAULT_LOG_LEVEL)
072b91f9c6510d Brian King 2008-07-01 1955 scmd_printk(KERN_ERR, cmnd,
072b91f9c6510d Brian King 2008-07-01 1956 "Failed to map DMA buffer for command. rc=%d\n", rc);
072b91f9c6510d Brian King 2008-07-01 1957
fd78f07ace9e37 Bart Van Assche 2021-04-09 1958 cmnd->result.combined = DID_ERROR << 16;
654080d02edb60 Tyrel Datwyler 2021-01-06 1959 cmnd->scsi_done(cmnd);
072b91f9c6510d Brian King 2008-07-01 1960 return 0;
072b91f9c6510d Brian King 2008-07-01 1961 }
072b91f9c6510d Brian King 2008-07-01 1962
072b91f9c6510d Brian King 2008-07-01 1963 /**
072b91f9c6510d Brian King 2008-07-01 1964 * ibmvfc_sync_completion - Signal that a synchronous command has completed
072b91f9c6510d Brian King 2008-07-01 1965 * @evt: ibmvfc event struct
072b91f9c6510d Brian King 2008-07-01 1966 *
072b91f9c6510d Brian King 2008-07-01 1967 **/
072b91f9c6510d Brian King 2008-07-01 1968 static void ibmvfc_sync_completion(struct ibmvfc_event *evt)
072b91f9c6510d Brian King 2008-07-01 1969 {
072b91f9c6510d Brian King 2008-07-01 1970 /* copy the response back */
072b91f9c6510d Brian King 2008-07-01 1971 if (evt->sync_iu)
072b91f9c6510d Brian King 2008-07-01 1972 *evt->sync_iu = *evt->xfer_iu;
072b91f9c6510d Brian King 2008-07-01 1973
072b91f9c6510d Brian King 2008-07-01 1974 complete(&evt->comp);
072b91f9c6510d Brian King 2008-07-01 1975 }
072b91f9c6510d Brian King 2008-07-01 1976
d31429e1517c00 Brian King 2009-10-19 1977 /**
d31429e1517c00 Brian King 2009-10-19 1978 * ibmvfc_bsg_timeout_done - Completion handler for cancelling BSG commands
d31429e1517c00 Brian King 2009-10-19 1979 * @evt: struct ibmvfc_event
d31429e1517c00 Brian King 2009-10-19 1980 *
d31429e1517c00 Brian King 2009-10-19 1981 **/
d31429e1517c00 Brian King 2009-10-19 1982 static void ibmvfc_bsg_timeout_done(struct ibmvfc_event *evt)
d31429e1517c00 Brian King 2009-10-19 1983 {
d31429e1517c00 Brian King 2009-10-19 1984 struct ibmvfc_host *vhost = evt->vhost;
d31429e1517c00 Brian King 2009-10-19 1985
d31429e1517c00 Brian King 2009-10-19 1986 ibmvfc_free_event(evt);
d31429e1517c00 Brian King 2009-10-19 1987 vhost->aborting_passthru = 0;
d31429e1517c00 Brian King 2009-10-19 1988 dev_info(vhost->dev, "Passthru command cancelled\n");
d31429e1517c00 Brian King 2009-10-19 1989 }
d31429e1517c00 Brian King 2009-10-19 1990
d31429e1517c00 Brian King 2009-10-19 1991 /**
d31429e1517c00 Brian King 2009-10-19 1992 * ibmvfc_bsg_timeout - Handle a BSG timeout
75cc8cfc6e13d4 Johannes Thumshirn 2016-11-17 1993 * @job: struct bsg_job that timed out
d31429e1517c00 Brian King 2009-10-19 1994 *
d31429e1517c00 Brian King 2009-10-19 1995 * Returns:
d31429e1517c00 Brian King 2009-10-19 1996 * 0 on success / other on failure
d31429e1517c00 Brian King 2009-10-19 1997 **/
75cc8cfc6e13d4 Johannes Thumshirn 2016-11-17 1998 static int ibmvfc_bsg_timeout(struct bsg_job *job)
d31429e1517c00 Brian King 2009-10-19 1999 {
cd21c605b2cf1c Johannes Thumshirn 2016-11-17 2000 struct ibmvfc_host *vhost = shost_priv(fc_bsg_to_shost(job));
d31429e1517c00 Brian King 2009-10-19 2001 unsigned long port_id = (unsigned long)job->dd_data;
d31429e1517c00 Brian King 2009-10-19 2002 struct ibmvfc_event *evt;
d31429e1517c00 Brian King 2009-10-19 2003 struct ibmvfc_tmf *tmf;
d31429e1517c00 Brian King 2009-10-19 2004 unsigned long flags;
d31429e1517c00 Brian King 2009-10-19 2005 int rc;
d31429e1517c00 Brian King 2009-10-19 2006
d31429e1517c00 Brian King 2009-10-19 2007 ENTER;
d31429e1517c00 Brian King 2009-10-19 2008 spin_lock_irqsave(vhost->host->host_lock, flags);
d31429e1517c00 Brian King 2009-10-19 2009 if (vhost->aborting_passthru || vhost->state != IBMVFC_ACTIVE) {
d31429e1517c00 Brian King 2009-10-19 2010 __ibmvfc_reset_host(vhost);
d31429e1517c00 Brian King 2009-10-19 2011 spin_unlock_irqrestore(vhost->host->host_lock, flags);
d31429e1517c00 Brian King 2009-10-19 2012 return 0;
d31429e1517c00 Brian King 2009-10-19 2013 }
d31429e1517c00 Brian King 2009-10-19 2014
d31429e1517c00 Brian King 2009-10-19 2015 vhost->aborting_passthru = 1;
e4b26f3db86498 Tyrel Datwyler 2021-01-06 2016 evt = ibmvfc_get_event(&vhost->crq);
d31429e1517c00 Brian King 2009-10-19 2017 ibmvfc_init_event(evt, ibmvfc_bsg_timeout_done, IBMVFC_MAD_FORMAT);
d31429e1517c00 Brian King 2009-10-19 2018
d31429e1517c00 Brian King 2009-10-19 2019 tmf = &evt->iu.tmf;
d31429e1517c00 Brian King 2009-10-19 2020 memset(tmf, 0, sizeof(*tmf));
0aab6c3f125e9e Tyrel Datwyler 2014-06-26 2021 tmf->common.version = cpu_to_be32(1);
0aab6c3f125e9e Tyrel Datwyler 2014-06-26 2022 tmf->common.opcode = cpu_to_be32(IBMVFC_TMF_MAD);
0aab6c3f125e9e Tyrel Datwyler 2014-06-26 2023 tmf->common.length = cpu_to_be16(sizeof(*tmf));
0aab6c3f125e9e Tyrel Datwyler 2014-06-26 2024 tmf->scsi_id = cpu_to_be64(port_id);
0aab6c3f125e9e Tyrel Datwyler 2014-06-26 2025 tmf->cancel_key = cpu_to_be32(IBMVFC_PASSTHRU_CANCEL_KEY);
0aab6c3f125e9e Tyrel Datwyler 2014-06-26 2026 tmf->my_cancel_key = cpu_to_be32(IBMVFC_INTERNAL_CANCEL_KEY);
d31429e1517c00 Brian King 2009-10-19 2027 rc = ibmvfc_send_event(evt, vhost, default_timeout);
d31429e1517c00 Brian King 2009-10-19 2028
d31429e1517c00 Brian King 2009-10-19 2029 if (rc != 0) {
d31429e1517c00 Brian King 2009-10-19 2030 vhost->aborting_passthru = 0;
d31429e1517c00 Brian King 2009-10-19 2031 dev_err(vhost->dev, "Failed to send cancel event. rc=%d\n", rc);
d31429e1517c00 Brian King 2009-10-19 2032 rc = -EIO;
d31429e1517c00 Brian King 2009-10-19 2033 } else
d31429e1517c00 Brian King 2009-10-19 2034 dev_info(vhost->dev, "Cancelling passthru command to port id 0x%lx\n",
d31429e1517c00 Brian King 2009-10-19 2035 port_id);
d31429e1517c00 Brian King 2009-10-19 2036
d31429e1517c00 Brian King 2009-10-19 2037 spin_unlock_irqrestore(vhost->host->host_lock, flags);
d31429e1517c00 Brian King 2009-10-19 2038
d31429e1517c00 Brian King 2009-10-19 2039 LEAVE;
d31429e1517c00 Brian King 2009-10-19 2040 return rc;
d31429e1517c00 Brian King 2009-10-19 2041 }
d31429e1517c00 Brian King 2009-10-19 2042
d31429e1517c00 Brian King 2009-10-19 2043 /**
d31429e1517c00 Brian King 2009-10-19 2044 * ibmvfc_bsg_plogi - PLOGI into a target to handle a BSG command
d31429e1517c00 Brian King 2009-10-19 2045 * @vhost: struct ibmvfc_host to send command
d31429e1517c00 Brian King 2009-10-19 2046 * @port_id: port ID to send command
d31429e1517c00 Brian King 2009-10-19 2047 *
d31429e1517c00 Brian King 2009-10-19 2048 * Returns:
d31429e1517c00 Brian King 2009-10-19 2049 * 0 on success / other on failure
d31429e1517c00 Brian King 2009-10-19 2050 **/
d31429e1517c00 Brian King 2009-10-19 2051 static int ibmvfc_bsg_plogi(struct ibmvfc_host *vhost, unsigned int port_id)
d31429e1517c00 Brian King 2009-10-19 2052 {
d31429e1517c00 Brian King 2009-10-19 2053 struct ibmvfc_port_login *plogi;
d31429e1517c00 Brian King 2009-10-19 2054 struct ibmvfc_target *tgt;
d31429e1517c00 Brian King 2009-10-19 2055 struct ibmvfc_event *evt;
d31429e1517c00 Brian King 2009-10-19 2056 union ibmvfc_iu rsp_iu;
d31429e1517c00 Brian King 2009-10-19 2057 unsigned long flags;
d31429e1517c00 Brian King 2009-10-19 2058 int rc = 0, issue_login = 1;
d31429e1517c00 Brian King 2009-10-19 2059
d31429e1517c00 Brian King 2009-10-19 2060 ENTER;
d31429e1517c00 Brian King 2009-10-19 2061 spin_lock_irqsave(vhost->host->host_lock, flags);
d31429e1517c00 Brian King 2009-10-19 2062 list_for_each_entry(tgt, &vhost->targets, queue) {
d31429e1517c00 Brian King 2009-10-19 2063 if (tgt->scsi_id == port_id) {
d31429e1517c00 Brian King 2009-10-19 2064 issue_login = 0;
d31429e1517c00 Brian King 2009-10-19 2065 break;
d31429e1517c00 Brian King 2009-10-19 2066 }
d31429e1517c00 Brian King 2009-10-19 2067 }
d31429e1517c00 Brian King 2009-10-19 2068
d31429e1517c00 Brian King 2009-10-19 2069 if (!issue_login)
d31429e1517c00 Brian King 2009-10-19 2070 goto unlock_out;
d31429e1517c00 Brian King 2009-10-19 @2071 if (unlikely((rc = ibmvfc_host_chkready(vhost))))
d31429e1517c00 Brian King 2009-10-19 2072 goto unlock_out;
d31429e1517c00 Brian King 2009-10-19 2073
e4b26f3db86498 Tyrel Datwyler 2021-01-06 2074 evt = ibmvfc_get_event(&vhost->crq);
d31429e1517c00 Brian King 2009-10-19 2075 ibmvfc_init_event(evt, ibmvfc_sync_completion, IBMVFC_MAD_FORMAT);
d31429e1517c00 Brian King 2009-10-19 2076 plogi = &evt->iu.plogi;
d31429e1517c00 Brian King 2009-10-19 2077 memset(plogi, 0, sizeof(*plogi));
0aab6c3f125e9e Tyrel Datwyler 2014-06-26 2078 plogi->common.version = cpu_to_be32(1);
0aab6c3f125e9e Tyrel Datwyler 2014-06-26 2079 plogi->common.opcode = cpu_to_be32(IBMVFC_PORT_LOGIN);
0aab6c3f125e9e Tyrel Datwyler 2014-06-26 2080 plogi->common.length = cpu_to_be16(sizeof(*plogi));
0aab6c3f125e9e Tyrel Datwyler 2014-06-26 2081 plogi->scsi_id = cpu_to_be64(port_id);
d31429e1517c00 Brian King 2009-10-19 2082 evt->sync_iu = &rsp_iu;
d31429e1517c00 Brian King 2009-10-19 2083 init_completion(&evt->comp);
d31429e1517c00 Brian King 2009-10-19 2084
d31429e1517c00 Brian King 2009-10-19 2085 rc = ibmvfc_send_event(evt, vhost, default_timeout);
d31429e1517c00 Brian King 2009-10-19 2086 spin_unlock_irqrestore(vhost->host->host_lock, flags);
d31429e1517c00 Brian King 2009-10-19 2087
d31429e1517c00 Brian King 2009-10-19 2088 if (rc)
d31429e1517c00 Brian King 2009-10-19 2089 return -EIO;
d31429e1517c00 Brian King 2009-10-19 2090
d31429e1517c00 Brian King 2009-10-19 2091 wait_for_completion(&evt->comp);
d31429e1517c00 Brian King 2009-10-19 2092
d31429e1517c00 Brian King 2009-10-19 2093 if (rsp_iu.plogi.common.status)
d31429e1517c00 Brian King 2009-10-19 2094 rc = -EIO;
d31429e1517c00 Brian King 2009-10-19 2095
d31429e1517c00 Brian King 2009-10-19 2096 spin_lock_irqsave(vhost->host->host_lock, flags);
d31429e1517c00 Brian King 2009-10-19 2097 ibmvfc_free_event(evt);
d31429e1517c00 Brian King 2009-10-19 2098 unlock_out:
d31429e1517c00 Brian King 2009-10-19 2099 spin_unlock_irqrestore(vhost->host->host_lock, flags);
d31429e1517c00 Brian King 2009-10-19 2100 LEAVE;
d31429e1517c00 Brian King 2009-10-19 2101 return rc;
d31429e1517c00 Brian King 2009-10-19 2102 }
d31429e1517c00 Brian King 2009-10-19 2103
:::::: The code at line 1947 was first introduced by commit
:::::: 072b91f9c6510d0ec4a49d07dbc318760c7da7b3 [SCSI] ibmvfc: IBM Power Virtual Fibre Channel Adapter Client Driver
:::::: TO: Brian King <brking(a)linux.vnet.ibm.com>
:::::: CC: James Bottomley <James.Bottomley(a)HansenPartnership.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
[bvanassche:scsi-for-next 33/41] include/linux/compiler_types.h:320:38: error: call to '__compiletime_assert_487' declared with attribute error: BUILD_BUG_ON failed: TEST_STATUS.combined != 0x01020308
by kernel test robot
tree: https://github.com/bvanassche/linux scsi-for-next
head: d8044d773ae9d9e70f9c61f98296c6c8391447ad
commit: f135308b20ad66b766bd6850a6fc591790a4df09 [33/41] Introduce more members in the scsi_status union
config: x86_64-rhel-8.3-kselftests (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/bvanassche/linux/commit/f135308b20ad66b766bd6850a6fc59...
git remote add bvanassche https://github.com/bvanassche/linux
git fetch --no-tags bvanassche scsi-for-next
git checkout f135308b20ad66b766bd6850a6fc591790a4df09
# save the attached .config to linux build tree
make W=1 W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from <command-line>:
drivers/scsi/scsi.c: In function 'init_scsi':
>> include/linux/compiler_types.h:320:38: error: call to '__compiletime_assert_487' declared with attribute error: BUILD_BUG_ON failed: TEST_STATUS.combined != 0x01020308
320 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:301:4: note: in definition of macro '__compiletime_assert'
301 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler_types.h:320:2: note: in expansion of macro '_compiletime_assert'
320 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:50:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^~~~~~~~~~~~~~~~
drivers/scsi/scsi.c:774:2: note: in expansion of macro 'BUILD_BUG_ON'
774 | BUILD_BUG_ON(TEST_STATUS.combined != 0x01020308);
| ^~~~~~~~~~~~
include/linux/compiler_types.h:320:38: error: call to '__compiletime_assert_488' declared with attribute error: BUILD_BUG_ON failed: driver_byte(TEST_STATUS) != 1
320 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:301:4: note: in definition of macro '__compiletime_assert'
301 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler_types.h:320:2: note: in expansion of macro '_compiletime_assert'
320 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:50:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^~~~~~~~~~~~~~~~
drivers/scsi/scsi.c:775:2: note: in expansion of macro 'BUILD_BUG_ON'
775 | BUILD_BUG_ON(driver_byte(TEST_STATUS) != 1);
| ^~~~~~~~~~~~
include/linux/compiler_types.h:320:38: error: call to '__compiletime_assert_489' declared with attribute error: BUILD_BUG_ON failed: host_byte(TEST_STATUS) != 2
320 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:301:4: note: in definition of macro '__compiletime_assert'
301 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler_types.h:320:2: note: in expansion of macro '_compiletime_assert'
320 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:50:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^~~~~~~~~~~~~~~~
drivers/scsi/scsi.c:776:2: note: in expansion of macro 'BUILD_BUG_ON'
776 | BUILD_BUG_ON(host_byte(TEST_STATUS) != 2);
| ^~~~~~~~~~~~
include/linux/compiler_types.h:320:38: error: call to '__compiletime_assert_490' declared with attribute error: BUILD_BUG_ON failed: msg_byte(TEST_STATUS) != 3
320 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:301:4: note: in definition of macro '__compiletime_assert'
301 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler_types.h:320:2: note: in expansion of macro '_compiletime_assert'
320 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:50:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^~~~~~~~~~~~~~~~
drivers/scsi/scsi.c:777:2: note: in expansion of macro 'BUILD_BUG_ON'
777 | BUILD_BUG_ON(msg_byte(TEST_STATUS) != 3);
| ^~~~~~~~~~~~
include/linux/compiler_types.h:320:38: error: call to '__compiletime_assert_491' declared with attribute error: BUILD_BUG_ON failed: status_byte(TEST_STATUS) != 4
320 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:301:4: note: in definition of macro '__compiletime_assert'
301 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler_types.h:320:2: note: in expansion of macro '_compiletime_assert'
320 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:50:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^~~~~~~~~~~~~~~~
drivers/scsi/scsi.c:778:2: note: in expansion of macro 'BUILD_BUG_ON'
778 | BUILD_BUG_ON(status_byte(TEST_STATUS) != 4);
| ^~~~~~~~~~~~
vim +/__compiletime_assert_487 +320 include/linux/compiler_types.h
eb5c2d4b45e3d2 Will Deacon 2020-07-21 306
eb5c2d4b45e3d2 Will Deacon 2020-07-21 307 #define _compiletime_assert(condition, msg, prefix, suffix) \
eb5c2d4b45e3d2 Will Deacon 2020-07-21 308 __compiletime_assert(condition, msg, prefix, suffix)
eb5c2d4b45e3d2 Will Deacon 2020-07-21 309
eb5c2d4b45e3d2 Will Deacon 2020-07-21 310 /**
eb5c2d4b45e3d2 Will Deacon 2020-07-21 311 * compiletime_assert - break build and emit msg if condition is false
eb5c2d4b45e3d2 Will Deacon 2020-07-21 312 * @condition: a compile-time constant condition to check
eb5c2d4b45e3d2 Will Deacon 2020-07-21 313 * @msg: a message to emit if condition is false
eb5c2d4b45e3d2 Will Deacon 2020-07-21 314 *
eb5c2d4b45e3d2 Will Deacon 2020-07-21 315 * In tradition of POSIX assert, this macro will break the build if the
eb5c2d4b45e3d2 Will Deacon 2020-07-21 316 * supplied condition is *false*, emitting the supplied error message if the
eb5c2d4b45e3d2 Will Deacon 2020-07-21 317 * compiler has support to do so.
eb5c2d4b45e3d2 Will Deacon 2020-07-21 318 */
eb5c2d4b45e3d2 Will Deacon 2020-07-21 319 #define compiletime_assert(condition, msg) \
eb5c2d4b45e3d2 Will Deacon 2020-07-21 @320 _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
eb5c2d4b45e3d2 Will Deacon 2020-07-21 321
:::::: The code at line 320 was first introduced by commit
:::::: eb5c2d4b45e3d2d5d052ea6b8f1463976b1020d5 compiler.h: Move compiletime_assert() macros into compiler_types.h
:::::: TO: Will Deacon <will(a)kernel.org>
:::::: CC: Will Deacon <will(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
drivers/fpga/dfl-fme-main.c:143:13: sparse: sparse: incorrect type in argument 1 (different address spaces)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: e70b911acc1687100c31e550251715dbdac96a12
commit: e5fc436f06eef54ef512ea55a9db8eb9f2e76959 sparse: use static inline for __chk_{user,io}_ptr()
date: 8 months ago
config: sh-randconfig-s031-20210414 (attached as .config)
compiler: sh4-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-280-g2cd6d34e-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout e5fc436f06eef54ef512ea55a9db8eb9f2e76959
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' W=1 ARCH=sh
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
drivers/fpga/dfl-fme-main.c:143:13: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int const *__gu_addr @@ got int [noderef] __user * @@
drivers/fpga/dfl-fme-main.c:143:13: sparse: expected int const *__gu_addr
drivers/fpga/dfl-fme-main.c:143:13: sparse: got int [noderef] __user *
>> drivers/fpga/dfl-fme-main.c:143:13: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got int const *__gu_addr @@
drivers/fpga/dfl-fme-main.c:143:13: sparse: expected void const volatile [noderef] __user *ptr
drivers/fpga/dfl-fme-main.c:143:13: sparse: got int const *__gu_addr
drivers/fpga/dfl-fme-main.c:155:13: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int const *__gu_addr @@ got int [noderef] __user * @@
drivers/fpga/dfl-fme-main.c:155:13: sparse: expected int const *__gu_addr
drivers/fpga/dfl-fme-main.c:155:13: sparse: got int [noderef] __user *
drivers/fpga/dfl-fme-main.c:155:13: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got int const *__gu_addr @@
drivers/fpga/dfl-fme-main.c:155:13: sparse: expected void const volatile [noderef] __user *ptr
drivers/fpga/dfl-fme-main.c:155:13: sparse: got int const *__gu_addr
--
drivers/fsi/fsi-scom.c:497:13: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned int const *__gu_addr @@ got unsigned int [noderef] [usertype] __user * @@
drivers/fsi/fsi-scom.c:497:13: sparse: expected unsigned int const *__gu_addr
drivers/fsi/fsi-scom.c:497:13: sparse: got unsigned int [noderef] [usertype] __user *
>> drivers/fsi/fsi-scom.c:497:13: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got unsigned int const *__gu_addr @@
drivers/fsi/fsi-scom.c:497:13: sparse: expected void const volatile [noderef] __user *ptr
drivers/fsi/fsi-scom.c:497:13: sparse: got unsigned int const *__gu_addr
--
>> drivers/spi/spi-lp8841-rtc.c:112:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *ptr @@ got void *iomem @@
drivers/spi/spi-lp8841-rtc.c:112:17: sparse: expected void const volatile [noderef] __iomem *ptr
drivers/spi/spi-lp8841-rtc.c:112:17: sparse: got void *iomem
drivers/spi/spi-lp8841-rtc.c:121:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *ptr @@ got void *iomem @@
drivers/spi/spi-lp8841-rtc.c:121:17: sparse: expected void const volatile [noderef] __iomem *ptr
drivers/spi/spi-lp8841-rtc.c:121:17: sparse: got void *iomem
drivers/spi/spi-lp8841-rtc.c:143:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *ptr @@ got void *iomem @@
drivers/spi/spi-lp8841-rtc.c:143:9: sparse: expected void const volatile [noderef] __iomem *ptr
drivers/spi/spi-lp8841-rtc.c:143:9: sparse: got void *iomem
drivers/spi/spi-lp8841-rtc.c:147:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *ptr @@ got void *iomem @@
drivers/spi/spi-lp8841-rtc.c:147:17: sparse: expected void const volatile [noderef] __iomem *ptr
drivers/spi/spi-lp8841-rtc.c:147:17: sparse: got void *iomem
drivers/spi/spi-lp8841-rtc.c:209:21: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *iomem @@ got void [noderef] __iomem * @@
drivers/spi/spi-lp8841-rtc.c:209:21: sparse: expected void *iomem
drivers/spi/spi-lp8841-rtc.c:209:21: sparse: got void [noderef] __iomem *
drivers/spi/spi-lp8841-rtc.c:57:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *ptr @@ got void *iomem @@
drivers/spi/spi-lp8841-rtc.c:57:9: sparse: expected void const volatile [noderef] __iomem *ptr
drivers/spi/spi-lp8841-rtc.c:57:9: sparse: got void *iomem
drivers/spi/spi-lp8841-rtc.c:63:28: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem * @@ got void *iomem @@
drivers/spi/spi-lp8841-rtc.c:63:28: sparse: expected void const [noderef] __iomem *
drivers/spi/spi-lp8841-rtc.c:63:28: sparse: got void *iomem
drivers/spi/spi-lp8841-rtc.c:47:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *ptr @@ got void *iomem @@
drivers/spi/spi-lp8841-rtc.c:47:9: sparse: expected void const volatile [noderef] __iomem *ptr
drivers/spi/spi-lp8841-rtc.c:47:9: sparse: got void *iomem
drivers/spi/spi-lp8841-rtc.c:47:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *ptr @@ got void *iomem @@
drivers/spi/spi-lp8841-rtc.c:47:9: sparse: expected void const volatile [noderef] __iomem *ptr
drivers/spi/spi-lp8841-rtc.c:47:9: sparse: got void *iomem
drivers/spi/spi-lp8841-rtc.c:57:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *ptr @@ got void *iomem @@
drivers/spi/spi-lp8841-rtc.c:57:9: sparse: expected void const volatile [noderef] __iomem *ptr
drivers/spi/spi-lp8841-rtc.c:57:9: sparse: got void *iomem
drivers/spi/spi-lp8841-rtc.c:63:28: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __iomem * @@ got void *iomem @@
drivers/spi/spi-lp8841-rtc.c:63:28: sparse: expected void const [noderef] __iomem *
drivers/spi/spi-lp8841-rtc.c:63:28: sparse: got void *iomem
drivers/spi/spi-lp8841-rtc.c:47:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *ptr @@ got void *iomem @@
drivers/spi/spi-lp8841-rtc.c:47:9: sparse: expected void const volatile [noderef] __iomem *ptr
drivers/spi/spi-lp8841-rtc.c:47:9: sparse: got void *iomem
drivers/spi/spi-lp8841-rtc.c:47:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *ptr @@ got void *iomem @@
drivers/spi/spi-lp8841-rtc.c:47:9: sparse: expected void const volatile [noderef] __iomem *ptr
drivers/spi/spi-lp8841-rtc.c:47:9: sparse: got void *iomem
--
drivers/vhost/vdpa.c:361:13: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned int const *__gu_addr @@ got unsigned int [noderef] [usertype] __user * @@
drivers/vhost/vdpa.c:361:13: sparse: expected unsigned int const *__gu_addr
drivers/vhost/vdpa.c:361:13: sparse: got unsigned int [noderef] [usertype] __user *
>> drivers/vhost/vdpa.c:361:13: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got unsigned int const *__gu_addr @@
drivers/vhost/vdpa.c:361:13: sparse: expected void const volatile [noderef] __user *ptr
drivers/vhost/vdpa.c:361:13: sparse: got unsigned int const *__gu_addr
--
drivers/watchdog/at91rm9200_wdt.c:174:21: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int const *__gu_addr @@ got int [noderef] __user *p @@
drivers/watchdog/at91rm9200_wdt.c:174:21: sparse: expected int const *__gu_addr
drivers/watchdog/at91rm9200_wdt.c:174:21: sparse: got int [noderef] __user *p
>> drivers/watchdog/at91rm9200_wdt.c:174:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got int const *__gu_addr @@
drivers/watchdog/at91rm9200_wdt.c:174:21: sparse: expected void const volatile [noderef] __user *ptr
drivers/watchdog/at91rm9200_wdt.c:174:21: sparse: got int const *__gu_addr
drivers/watchdog/at91rm9200_wdt.c:185:21: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int const *__gu_addr @@ got int [noderef] __user *p @@
drivers/watchdog/at91rm9200_wdt.c:185:21: sparse: expected int const *__gu_addr
drivers/watchdog/at91rm9200_wdt.c:185:21: sparse: got int [noderef] __user *p
drivers/watchdog/at91rm9200_wdt.c:185:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got int const *__gu_addr @@
drivers/watchdog/at91rm9200_wdt.c:185:21: sparse: expected void const volatile [noderef] __user *ptr
drivers/watchdog/at91rm9200_wdt.c:185:21: sparse: got int const *__gu_addr
drivers/watchdog/at91rm9200_wdt.c:219:27: sparse: sparse: incorrect type in initializer (incompatible argument 2 (different address spaces)) @@ expected int ( *write )( ... ) @@ got int ( * )( ... ) @@
drivers/watchdog/at91rm9200_wdt.c:219:27: sparse: expected int ( *write )( ... )
drivers/watchdog/at91rm9200_wdt.c:219:27: sparse: got int ( * )( ... )
--
drivers/watchdog/kempld_wdt.c:349:21: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int const *__gu_addr @@ got int [noderef] __user *p @@
drivers/watchdog/kempld_wdt.c:349:21: sparse: expected int const *__gu_addr
drivers/watchdog/kempld_wdt.c:349:21: sparse: got int [noderef] __user *p
>> drivers/watchdog/kempld_wdt.c:349:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got int const *__gu_addr @@
drivers/watchdog/kempld_wdt.c:349:21: sparse: expected void const volatile [noderef] __user *ptr
drivers/watchdog/kempld_wdt.c:349:21: sparse: got int const *__gu_addr
--
drivers/watchdog/shwdt.c: note: in included file:
arch/sh/include/asm/watchdog.h:144:16: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned int @@
arch/sh/include/asm/watchdog.h:144:16: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/include/asm/watchdog.h:144:16: sparse: got unsigned int
arch/sh/include/asm/watchdog.h:156:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned int @@
arch/sh/include/asm/watchdog.h:156:9: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/include/asm/watchdog.h:156:9: sparse: got unsigned int
arch/sh/include/asm/watchdog.h:134:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned int @@
arch/sh/include/asm/watchdog.h:134:9: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/include/asm/watchdog.h:134:9: sparse: got unsigned int
arch/sh/include/asm/watchdog.h:144:16: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned int @@
arch/sh/include/asm/watchdog.h:144:16: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/include/asm/watchdog.h:144:16: sparse: got unsigned int
arch/sh/include/asm/watchdog.h:156:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned int @@
arch/sh/include/asm/watchdog.h:156:9: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/include/asm/watchdog.h:156:9: sparse: got unsigned int
drivers/watchdog/shwdt.c: note: in included file (through arch/sh/include/asm/watchdog.h):
>> arch/sh/include/cpu-sh2/cpu/watchdog.h:44:16: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned int @@
arch/sh/include/cpu-sh2/cpu/watchdog.h:44:16: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/include/cpu-sh2/cpu/watchdog.h:44:16: sparse: got unsigned int
arch/sh/include/cpu-sh2/cpu/watchdog.h:62:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned int @@
arch/sh/include/cpu-sh2/cpu/watchdog.h:62:9: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/include/cpu-sh2/cpu/watchdog.h:62:9: sparse: got unsigned int
drivers/watchdog/shwdt.c: note: in included file:
arch/sh/include/asm/watchdog.h:144:16: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned int @@
arch/sh/include/asm/watchdog.h:144:16: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/include/asm/watchdog.h:144:16: sparse: got unsigned int
arch/sh/include/asm/watchdog.h:156:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned int @@
arch/sh/include/asm/watchdog.h:156:9: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/include/asm/watchdog.h:156:9: sparse: got unsigned int
arch/sh/include/asm/watchdog.h:144:16: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned int @@
arch/sh/include/asm/watchdog.h:144:16: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/include/asm/watchdog.h:144:16: sparse: got unsigned int
arch/sh/include/asm/watchdog.h:156:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned int @@
arch/sh/include/asm/watchdog.h:156:9: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/include/asm/watchdog.h:156:9: sparse: got unsigned int
arch/sh/include/asm/watchdog.h:134:9: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected void const volatile [noderef] __iomem *ptr @@ got unsigned int @@
arch/sh/include/asm/watchdog.h:134:9: sparse: expected void const volatile [noderef] __iomem *ptr
arch/sh/include/asm/watchdog.h:134:9: sparse: got unsigned int
--
drivers/net/ppp/pppoe.c:765:21: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int const *__gu_addr @@ got int [noderef] __user * @@
drivers/net/ppp/pppoe.c:765:21: sparse: expected int const *__gu_addr
drivers/net/ppp/pppoe.c:765:21: sparse: got int [noderef] __user *
>> drivers/net/ppp/pppoe.c:765:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got int const *__gu_addr @@
drivers/net/ppp/pppoe.c:765:21: sparse: expected void const volatile [noderef] __user *ptr
drivers/net/ppp/pppoe.c:765:21: sparse: got int const *__gu_addr
drivers/net/ppp/pppoe.c:778:21: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int const *__gu_addr @@ got int [noderef] __user * @@
drivers/net/ppp/pppoe.c:778:21: sparse: expected int const *__gu_addr
drivers/net/ppp/pppoe.c:778:21: sparse: got int [noderef] __user *
drivers/net/ppp/pppoe.c:778:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got int const *__gu_addr @@
drivers/net/ppp/pppoe.c:778:21: sparse: expected void const volatile [noderef] __user *ptr
drivers/net/ppp/pppoe.c:778:21: sparse: got int const *__gu_addr
--
net/atm/mpoa_proc.c:223:21: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected char const *__gu_addr @@ got char const [noderef] __user * @@
net/atm/mpoa_proc.c:223:21: sparse: expected char const *__gu_addr
net/atm/mpoa_proc.c:223:21: sparse: got char const [noderef] __user *
>> net/atm/mpoa_proc.c:223:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got char const *__gu_addr @@
net/atm/mpoa_proc.c:223:21: sparse: expected void const volatile [noderef] __user *ptr
net/atm/mpoa_proc.c:223:21: sparse: got char const *__gu_addr
--
net/bluetooth/hci_sock.c:1941:13: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int const *__gu_addr @@ got int [noderef] __user *optlen @@
net/bluetooth/hci_sock.c:1941:13: sparse: expected int const *__gu_addr
net/bluetooth/hci_sock.c:1941:13: sparse: got int [noderef] __user *optlen
>> net/bluetooth/hci_sock.c:1941:13: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got int const *__gu_addr @@
net/bluetooth/hci_sock.c:1941:13: sparse: expected void const volatile [noderef] __user *ptr
net/bluetooth/hci_sock.c:1941:13: sparse: got int const *__gu_addr
--
net/bluetooth/hci_core.c:2099:13: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned short const *__gu_addr @@ got unsigned short [noderef] [usertype] __user * @@
net/bluetooth/hci_core.c:2099:13: sparse: expected unsigned short const *__gu_addr
net/bluetooth/hci_core.c:2099:13: sparse: got unsigned short [noderef] [usertype] __user *
>> net/bluetooth/hci_core.c:2099:13: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got unsigned short const *__gu_addr @@
net/bluetooth/hci_core.c:2099:13: sparse: expected void const volatile [noderef] __user *ptr
net/bluetooth/hci_core.c:2099:13: sparse: got unsigned short const *__gu_addr
--
net/bluetooth/l2cap_sock.c:428:13: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int const *__gu_addr @@ got int [noderef] __user *optlen @@
net/bluetooth/l2cap_sock.c:428:13: sparse: expected int const *__gu_addr
net/bluetooth/l2cap_sock.c:428:13: sparse: got int [noderef] __user *optlen
>> net/bluetooth/l2cap_sock.c:428:13: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got int const *__gu_addr @@
net/bluetooth/l2cap_sock.c:428:13: sparse: expected void const volatile [noderef] __user *ptr
net/bluetooth/l2cap_sock.c:428:13: sparse: got int const *__gu_addr
net/bluetooth/l2cap_sock.c:553:13: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int const *__gu_addr @@ got int [noderef] __user *optlen @@
net/bluetooth/l2cap_sock.c:553:13: sparse: expected int const *__gu_addr
net/bluetooth/l2cap_sock.c:553:13: sparse: got int [noderef] __user *optlen
net/bluetooth/l2cap_sock.c:553:13: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got int const *__gu_addr @@
net/bluetooth/l2cap_sock.c:553:13: sparse: expected void const volatile [noderef] __user *ptr
net/bluetooth/l2cap_sock.c:553:13: sparse: got int const *__gu_addr
--
net/bluetooth/sco.c:892:13: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int const *__gu_addr @@ got int [noderef] __user *optlen @@
net/bluetooth/sco.c:892:13: sparse: expected int const *__gu_addr
net/bluetooth/sco.c:892:13: sparse: got int [noderef] __user *optlen
>> net/bluetooth/sco.c:892:13: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got int const *__gu_addr @@
net/bluetooth/sco.c:892:13: sparse: expected void const volatile [noderef] __user *ptr
net/bluetooth/sco.c:892:13: sparse: got int const *__gu_addr
net/bluetooth/sco.c:957:13: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int const *__gu_addr @@ got int [noderef] __user *optlen @@
net/bluetooth/sco.c:957:13: sparse: expected int const *__gu_addr
net/bluetooth/sco.c:957:13: sparse: got int [noderef] __user *optlen
net/bluetooth/sco.c:957:13: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got int const *__gu_addr @@
net/bluetooth/sco.c:957:13: sparse: expected void const volatile [noderef] __user *ptr
net/bluetooth/sco.c:957:13: sparse: got int const *__gu_addr
--
net/bluetooth/rfcomm/sock.c:769:13: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int const *__gu_addr @@ got int [noderef] __user *optlen @@
net/bluetooth/rfcomm/sock.c:769:13: sparse: expected int const *__gu_addr
net/bluetooth/rfcomm/sock.c:769:13: sparse: got int [noderef] __user *optlen
>> net/bluetooth/rfcomm/sock.c:769:13: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got int const *__gu_addr @@
net/bluetooth/rfcomm/sock.c:769:13: sparse: expected void const volatile [noderef] __user *ptr
net/bluetooth/rfcomm/sock.c:769:13: sparse: got int const *__gu_addr
net/bluetooth/rfcomm/sock.c:847:13: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int const *__gu_addr @@ got int [noderef] __user *optlen @@
net/bluetooth/rfcomm/sock.c:847:13: sparse: expected int const *__gu_addr
net/bluetooth/rfcomm/sock.c:847:13: sparse: got int [noderef] __user *optlen
net/bluetooth/rfcomm/sock.c:847:13: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got int const *__gu_addr @@
net/bluetooth/rfcomm/sock.c:847:13: sparse: expected void const volatile [noderef] __user *ptr
net/bluetooth/rfcomm/sock.c:847:13: sparse: got int const *__gu_addr
--
net/l2tp/l2tp_ppp.c:1376:13: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int const *__gu_addr @@ got int [noderef] __user *optlen @@
net/l2tp/l2tp_ppp.c:1376:13: sparse: expected int const *__gu_addr
net/l2tp/l2tp_ppp.c:1376:13: sparse: got int [noderef] __user *optlen
>> net/l2tp/l2tp_ppp.c:1376:13: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got int const *__gu_addr @@
net/l2tp/l2tp_ppp.c:1376:13: sparse: expected void const volatile [noderef] __user *ptr
net/l2tp/l2tp_ppp.c:1376:13: sparse: got int const *__gu_addr
--
net/nfc/llcp_sock.c:308:13: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int const *__gu_addr @@ got int [noderef] __user *optlen @@
net/nfc/llcp_sock.c:308:13: sparse: expected int const *__gu_addr
net/nfc/llcp_sock.c:308:13: sparse: got int [noderef] __user *optlen
>> net/nfc/llcp_sock.c:308:13: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got int const *__gu_addr @@
net/nfc/llcp_sock.c:308:13: sparse: expected void const volatile [noderef] __user *ptr
net/nfc/llcp_sock.c:308:13: sparse: got int const *__gu_addr
--
net/rds/af_rds.c:245:22: sparse: sparse: invalid assignment: |=
net/rds/af_rds.c:245:22: sparse: left side has type restricted __poll_t
net/rds/af_rds.c:245:22: sparse: right side has type int
net/rds/af_rds.c:262:21: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned char const *__gu_addr @@ got unsigned char [noderef] [usertype] __user * @@
net/rds/af_rds.c:262:21: sparse: expected unsigned char const *__gu_addr
net/rds/af_rds.c:262:21: sparse: got unsigned char [noderef] [usertype] __user *
>> net/rds/af_rds.c:262:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got unsigned char const *__gu_addr @@
net/rds/af_rds.c:262:21: sparse: expected void const volatile [noderef] __user *ptr
net/rds/af_rds.c:262:21: sparse: got unsigned char const *__gu_addr
net/rds/af_rds.c:493:13: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int const *__gu_addr @@ got int [noderef] __user *optlen @@
net/rds/af_rds.c:493:13: sparse: expected int const *__gu_addr
net/rds/af_rds.c:493:13: sparse: got int [noderef] __user *optlen
>> net/rds/af_rds.c:493:13: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got int const *__gu_addr @@
net/rds/af_rds.c:493:13: sparse: expected void const volatile [noderef] __user *ptr
net/rds/af_rds.c:493:13: sparse: got int const *__gu_addr
--
net/rds/info.c:171:13: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int const *__gu_addr @@ got int [noderef] __user *optlen @@
net/rds/info.c:171:13: sparse: expected int const *__gu_addr
net/rds/info.c:171:13: sparse: got int [noderef] __user *optlen
>> net/rds/info.c:171:13: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got int const *__gu_addr @@
net/rds/info.c:171:13: sparse: expected void const volatile [noderef] __user *ptr
net/rds/info.c:171:13: sparse: got int const *__gu_addr
--
net/rxrpc/af_rxrpc.c:697:13: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int const *__gu_addr @@ got int [noderef] __user *_optlen @@
net/rxrpc/af_rxrpc.c:697:13: sparse: expected int const *__gu_addr
net/rxrpc/af_rxrpc.c:697:13: sparse: got int [noderef] __user *_optlen
>> net/rxrpc/af_rxrpc.c:697:13: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got int const *__gu_addr @@
net/rxrpc/af_rxrpc.c:697:13: sparse: expected void const volatile [noderef] __user *ptr
net/rxrpc/af_rxrpc.c:697:13: sparse: got int const *__gu_addr
--
net/tls/tls_main.c:341:13: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int const *__gu_addr @@ got int [noderef] __user *optlen @@
net/tls/tls_main.c:341:13: sparse: expected int const *__gu_addr
net/tls/tls_main.c:341:13: sparse: got int [noderef] __user *optlen
>> net/tls/tls_main.c:341:13: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got int const *__gu_addr @@
net/tls/tls_main.c:341:13: sparse: expected void const volatile [noderef] __user *ptr
net/tls/tls_main.c:341:13: sparse: got int const *__gu_addr
vim +143 drivers/fpga/dfl-fme-main.c
0a27ff24d59662 Kang Luwei 2018-06-30 136
69bb18ddfc4331 Wu Hao 2019-08-04 137 static long fme_hdr_ioctl_release_port(struct dfl_feature_platform_data *pdata,
69bb18ddfc4331 Wu Hao 2019-08-04 138 unsigned long arg)
69bb18ddfc4331 Wu Hao 2019-08-04 139 {
69bb18ddfc4331 Wu Hao 2019-08-04 140 struct dfl_fpga_cdev *cdev = pdata->dfl_cdev;
69bb18ddfc4331 Wu Hao 2019-08-04 141 int port_id;
69bb18ddfc4331 Wu Hao 2019-08-04 142
69bb18ddfc4331 Wu Hao 2019-08-04 @143 if (get_user(port_id, (int __user *)arg))
69bb18ddfc4331 Wu Hao 2019-08-04 144 return -EFAULT;
69bb18ddfc4331 Wu Hao 2019-08-04 145
69bb18ddfc4331 Wu Hao 2019-08-04 146 return dfl_fpga_cdev_release_port(cdev, port_id);
69bb18ddfc4331 Wu Hao 2019-08-04 147 }
69bb18ddfc4331 Wu Hao 2019-08-04 148
:::::: The code at line 143 was first introduced by commit
:::::: 69bb18ddfc4331ba1dea9db811caf93e95726408 fpga: dfl: fme: add DFL_FPGA_FME_PORT_RELEASE/ASSIGN ioctl support.
:::::: TO: Wu Hao <hao.wu(a)intel.com>
:::::: CC: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
[lee-mfd:ib-mfd-clk-gpio-regulator-rtc-5.13 10/16] drivers/regulator/rohm-regulator.c:44:10: error: implicit declaration of function 'regulator_desc_list_voltage_linear'; did you mean 'regulator_list_voltage_linear'?
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git ib-mfd-clk-gpio-regulator-rtc-5.13
head: 5a8a64d9a38b9d3794f9f5e153fc0358b858cc24
commit: 9cf37cec4b7d2cb972ba1682dd5c8f39a5761129 [10/16] regulator: rohm-regulator: linear voltage support
config: i386-randconfig-s001-20210414 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-280-g2cd6d34e-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git/commit/?id=9c...
git remote add lee-mfd https://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git
git fetch --no-tags lee-mfd ib-mfd-clk-gpio-regulator-rtc-5.13
git checkout 9cf37cec4b7d2cb972ba1682dd5c8f39a5761129
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
drivers/regulator/rohm-regulator.c: In function 'set_dvs_level':
>> drivers/regulator/rohm-regulator.c:44:10: error: implicit declaration of function 'regulator_desc_list_voltage_linear'; did you mean 'regulator_list_voltage_linear'? [-Werror=implicit-function-declaration]
44 | ret = regulator_desc_list_voltage_linear(desc, i);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| regulator_list_voltage_linear
cc1: some warnings being treated as errors
vim +44 drivers/regulator/rohm-regulator.c
10
11 static int set_dvs_level(const struct regulator_desc *desc,
12 struct device_node *np, struct regmap *regmap,
13 char *prop, unsigned int reg, unsigned int mask,
14 unsigned int omask, unsigned int oreg)
15 {
16 int ret, i;
17 uint32_t uv;
18
19 ret = of_property_read_u32(np, prop, &uv);
20 if (ret) {
21 if (ret != -EINVAL)
22 return ret;
23 return 0;
24 }
25 /* If voltage is set to 0 => disable */
26 if (uv == 0) {
27 if (omask)
28 return regmap_update_bits(regmap, oreg, omask, 0);
29 }
30 /* Some setups don't allow setting own voltage but do allow enabling */
31 if (!mask) {
32 if (omask)
33 return regmap_update_bits(regmap, oreg, omask, omask);
34
35 return -EINVAL;
36 }
37 for (i = 0; i < desc->n_voltages; i++) {
38 /* NOTE to next hacker - Does not support pickable ranges */
39 if (desc->linear_range_selectors)
40 return -EINVAL;
41 if (desc->n_linear_ranges)
42 ret = regulator_desc_list_voltage_linear_range(desc, i);
43 else
> 44 ret = regulator_desc_list_voltage_linear(desc, i);
45 if (ret < 0)
46 continue;
47 if (ret == uv) {
48 i <<= ffs(desc->vsel_mask) - 1;
49 ret = regmap_update_bits(regmap, reg, mask, i);
50 if (omask && !ret)
51 ret = regmap_update_bits(regmap, oreg, omask,
52 omask);
53 break;
54 }
55 }
56 return ret;
57 }
58
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
Re: [PATCH] btrfs: zoned: fix unpaired block group unfreeze during device replace
by kernel test robot
Hi,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on kdave/for-next]
[also build test WARNING on v5.12-rc7 next-20210414]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/fdmanana-kernel-org/btrfs-zoned-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-next
config: x86_64-randconfig-r033-20210414 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 9829f5e6b1bca9b61efc629770d28bb9014dec45)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://github.com/0day-ci/linux/commit/31f44555b4f7341b558a9062f0977e8fe...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review fdmanana-kernel-org/btrfs-zoned-fix-unpaired-block-group-unfreeze-during-device-replace/20210414-201003
git checkout 31f44555b4f7341b558a9062f0977e8fe817045d
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> fs/btrfs/scrub.c:3836:1: warning: unused label 'done' [-Wunused-label]
done:
^~~~~
1 warning generated.
vim +/done +3836 fs/btrfs/scrub.c
de17addce7a20d Naohiro Aota 2021-02-04 3586
a2de733c78fa7a Arne Jansen 2011-03-08 3587 static noinline_for_stack
a36cf8b8933e4a Stefan Behrens 2012-11-02 3588 int scrub_enumerate_chunks(struct scrub_ctx *sctx,
32934280967d00 Omar Sandoval 2018-08-14 3589 struct btrfs_device *scrub_dev, u64 start, u64 end)
a2de733c78fa7a Arne Jansen 2011-03-08 3590 {
a2de733c78fa7a Arne Jansen 2011-03-08 3591 struct btrfs_dev_extent *dev_extent = NULL;
a2de733c78fa7a Arne Jansen 2011-03-08 3592 struct btrfs_path *path;
0b246afa62b0cf Jeff Mahoney 2016-06-22 3593 struct btrfs_fs_info *fs_info = sctx->fs_info;
0b246afa62b0cf Jeff Mahoney 2016-06-22 3594 struct btrfs_root *root = fs_info->dev_root;
a2de733c78fa7a Arne Jansen 2011-03-08 3595 u64 length;
a2de733c78fa7a Arne Jansen 2011-03-08 3596 u64 chunk_offset;
55e3a601c81cdc Zhaolei 2015-08-05 3597 int ret = 0;
76a8efa171bf6c Zhaolei 2015-11-17 3598 int ro_set;
a2de733c78fa7a Arne Jansen 2011-03-08 3599 int slot;
a2de733c78fa7a Arne Jansen 2011-03-08 3600 struct extent_buffer *l;
a2de733c78fa7a Arne Jansen 2011-03-08 3601 struct btrfs_key key;
a2de733c78fa7a Arne Jansen 2011-03-08 3602 struct btrfs_key found_key;
32da5386d9a4fd David Sterba 2019-10-29 3603 struct btrfs_block_group *cache;
ff023aac31198e Stefan Behrens 2012-11-06 3604 struct btrfs_dev_replace *dev_replace = &fs_info->dev_replace;
a2de733c78fa7a Arne Jansen 2011-03-08 3605
a2de733c78fa7a Arne Jansen 2011-03-08 3606 path = btrfs_alloc_path();
a2de733c78fa7a Arne Jansen 2011-03-08 3607 if (!path)
a2de733c78fa7a Arne Jansen 2011-03-08 3608 return -ENOMEM;
a2de733c78fa7a Arne Jansen 2011-03-08 3609
e4058b54d1e442 David Sterba 2015-11-27 3610 path->reada = READA_FORWARD;
a2de733c78fa7a Arne Jansen 2011-03-08 3611 path->search_commit_root = 1;
a2de733c78fa7a Arne Jansen 2011-03-08 3612 path->skip_locking = 1;
a2de733c78fa7a Arne Jansen 2011-03-08 3613
a36cf8b8933e4a Stefan Behrens 2012-11-02 3614 key.objectid = scrub_dev->devid;
a2de733c78fa7a Arne Jansen 2011-03-08 3615 key.offset = 0ull;
a2de733c78fa7a Arne Jansen 2011-03-08 3616 key.type = BTRFS_DEV_EXTENT_KEY;
a2de733c78fa7a Arne Jansen 2011-03-08 3617
a2de733c78fa7a Arne Jansen 2011-03-08 3618 while (1) {
a2de733c78fa7a Arne Jansen 2011-03-08 3619 ret = btrfs_search_slot(NULL, root, &key, path, 0, 0);
a2de733c78fa7a Arne Jansen 2011-03-08 3620 if (ret < 0)
8c51032f978bac Arne Jansen 2011-06-03 3621 break;
8c51032f978bac Arne Jansen 2011-06-03 3622 if (ret > 0) {
8c51032f978bac Arne Jansen 2011-06-03 3623 if (path->slots[0] >=
8c51032f978bac Arne Jansen 2011-06-03 3624 btrfs_header_nritems(path->nodes[0])) {
8c51032f978bac Arne Jansen 2011-06-03 3625 ret = btrfs_next_leaf(root, path);
55e3a601c81cdc Zhaolei 2015-08-05 3626 if (ret < 0)
55e3a601c81cdc Zhaolei 2015-08-05 3627 break;
55e3a601c81cdc Zhaolei 2015-08-05 3628 if (ret > 0) {
55e3a601c81cdc Zhaolei 2015-08-05 3629 ret = 0;
8c51032f978bac Arne Jansen 2011-06-03 3630 break;
8c51032f978bac Arne Jansen 2011-06-03 3631 }
55e3a601c81cdc Zhaolei 2015-08-05 3632 } else {
55e3a601c81cdc Zhaolei 2015-08-05 3633 ret = 0;
55e3a601c81cdc Zhaolei 2015-08-05 3634 }
8c51032f978bac Arne Jansen 2011-06-03 3635 }
a2de733c78fa7a Arne Jansen 2011-03-08 3636
a2de733c78fa7a Arne Jansen 2011-03-08 3637 l = path->nodes[0];
a2de733c78fa7a Arne Jansen 2011-03-08 3638 slot = path->slots[0];
a2de733c78fa7a Arne Jansen 2011-03-08 3639
a2de733c78fa7a Arne Jansen 2011-03-08 3640 btrfs_item_key_to_cpu(l, &found_key, slot);
a2de733c78fa7a Arne Jansen 2011-03-08 3641
a36cf8b8933e4a Stefan Behrens 2012-11-02 3642 if (found_key.objectid != scrub_dev->devid)
a2de733c78fa7a Arne Jansen 2011-03-08 3643 break;
a2de733c78fa7a Arne Jansen 2011-03-08 3644
962a298f35110e David Sterba 2014-06-04 3645 if (found_key.type != BTRFS_DEV_EXTENT_KEY)
a2de733c78fa7a Arne Jansen 2011-03-08 3646 break;
a2de733c78fa7a Arne Jansen 2011-03-08 3647
a2de733c78fa7a Arne Jansen 2011-03-08 3648 if (found_key.offset >= end)
a2de733c78fa7a Arne Jansen 2011-03-08 3649 break;
a2de733c78fa7a Arne Jansen 2011-03-08 3650
a2de733c78fa7a Arne Jansen 2011-03-08 3651 if (found_key.offset < key.offset)
a2de733c78fa7a Arne Jansen 2011-03-08 3652 break;
a2de733c78fa7a Arne Jansen 2011-03-08 3653
a2de733c78fa7a Arne Jansen 2011-03-08 3654 dev_extent = btrfs_item_ptr(l, slot, struct btrfs_dev_extent);
a2de733c78fa7a Arne Jansen 2011-03-08 3655 length = btrfs_dev_extent_length(l, dev_extent);
a2de733c78fa7a Arne Jansen 2011-03-08 3656
ced96edc48ba45 Qu Wenruo 2014-06-19 3657 if (found_key.offset + length <= start)
ced96edc48ba45 Qu Wenruo 2014-06-19 3658 goto skip;
a2de733c78fa7a Arne Jansen 2011-03-08 3659
a2de733c78fa7a Arne Jansen 2011-03-08 3660 chunk_offset = btrfs_dev_extent_chunk_offset(l, dev_extent);
a2de733c78fa7a Arne Jansen 2011-03-08 3661
a2de733c78fa7a Arne Jansen 2011-03-08 3662 /*
a2de733c78fa7a Arne Jansen 2011-03-08 3663 * get a reference on the corresponding block group to prevent
a2de733c78fa7a Arne Jansen 2011-03-08 3664 * the chunk from going away while we scrub it
a2de733c78fa7a Arne Jansen 2011-03-08 3665 */
a2de733c78fa7a Arne Jansen 2011-03-08 3666 cache = btrfs_lookup_block_group(fs_info, chunk_offset);
ced96edc48ba45 Qu Wenruo 2014-06-19 3667
ced96edc48ba45 Qu Wenruo 2014-06-19 3668 /* some chunks are removed but not committed to disk yet,
ced96edc48ba45 Qu Wenruo 2014-06-19 3669 * continue scrubbing */
ced96edc48ba45 Qu Wenruo 2014-06-19 3670 if (!cache)
ced96edc48ba45 Qu Wenruo 2014-06-19 3671 goto skip;
ced96edc48ba45 Qu Wenruo 2014-06-19 3672
78ce9fc269af6e Naohiro Aota 2021-02-04 3673 if (sctx->is_dev_replace && btrfs_is_zoned(fs_info)) {
78ce9fc269af6e Naohiro Aota 2021-02-04 3674 spin_lock(&cache->lock);
78ce9fc269af6e Naohiro Aota 2021-02-04 3675 if (!cache->to_copy) {
78ce9fc269af6e Naohiro Aota 2021-02-04 3676 spin_unlock(&cache->lock);
31f44555b4f734 Filipe Manana 2021-04-14 3677 btrfs_put_block_group(cache);
31f44555b4f734 Filipe Manana 2021-04-14 3678 goto skip;
78ce9fc269af6e Naohiro Aota 2021-02-04 3679 }
78ce9fc269af6e Naohiro Aota 2021-02-04 3680 spin_unlock(&cache->lock);
78ce9fc269af6e Naohiro Aota 2021-02-04 3681 }
78ce9fc269af6e Naohiro Aota 2021-02-04 3682
2473d24f2b77da Filipe Manana 2020-05-08 3683 /*
2473d24f2b77da Filipe Manana 2020-05-08 3684 * Make sure that while we are scrubbing the corresponding block
2473d24f2b77da Filipe Manana 2020-05-08 3685 * group doesn't get its logical address and its device extents
2473d24f2b77da Filipe Manana 2020-05-08 3686 * reused for another block group, which can possibly be of a
2473d24f2b77da Filipe Manana 2020-05-08 3687 * different type and different profile. We do this to prevent
2473d24f2b77da Filipe Manana 2020-05-08 3688 * false error detections and crashes due to bogus attempts to
2473d24f2b77da Filipe Manana 2020-05-08 3689 * repair extents.
2473d24f2b77da Filipe Manana 2020-05-08 3690 */
2473d24f2b77da Filipe Manana 2020-05-08 3691 spin_lock(&cache->lock);
2473d24f2b77da Filipe Manana 2020-05-08 3692 if (cache->removed) {
2473d24f2b77da Filipe Manana 2020-05-08 3693 spin_unlock(&cache->lock);
2473d24f2b77da Filipe Manana 2020-05-08 3694 btrfs_put_block_group(cache);
2473d24f2b77da Filipe Manana 2020-05-08 3695 goto skip;
2473d24f2b77da Filipe Manana 2020-05-08 3696 }
6b7304af62d02d Filipe Manana 2020-05-08 3697 btrfs_freeze_block_group(cache);
2473d24f2b77da Filipe Manana 2020-05-08 3698 spin_unlock(&cache->lock);
2473d24f2b77da Filipe Manana 2020-05-08 3699
55e3a601c81cdc Zhaolei 2015-08-05 3700 /*
55e3a601c81cdc Zhaolei 2015-08-05 3701 * we need call btrfs_inc_block_group_ro() with scrubs_paused,
55e3a601c81cdc Zhaolei 2015-08-05 3702 * to avoid deadlock caused by:
55e3a601c81cdc Zhaolei 2015-08-05 3703 * btrfs_inc_block_group_ro()
55e3a601c81cdc Zhaolei 2015-08-05 3704 * -> btrfs_wait_for_commit()
55e3a601c81cdc Zhaolei 2015-08-05 3705 * -> btrfs_commit_transaction()
55e3a601c81cdc Zhaolei 2015-08-05 3706 * -> btrfs_scrub_pause()
55e3a601c81cdc Zhaolei 2015-08-05 3707 */
55e3a601c81cdc Zhaolei 2015-08-05 3708 scrub_pause_on(fs_info);
b12de52896c0e8 Qu Wenruo 2019-11-15 3709
b12de52896c0e8 Qu Wenruo 2019-11-15 3710 /*
b12de52896c0e8 Qu Wenruo 2019-11-15 3711 * Don't do chunk preallocation for scrub.
b12de52896c0e8 Qu Wenruo 2019-11-15 3712 *
b12de52896c0e8 Qu Wenruo 2019-11-15 3713 * This is especially important for SYSTEM bgs, or we can hit
b12de52896c0e8 Qu Wenruo 2019-11-15 3714 * -EFBIG from btrfs_finish_chunk_alloc() like:
b12de52896c0e8 Qu Wenruo 2019-11-15 3715 * 1. The only SYSTEM bg is marked RO.
b12de52896c0e8 Qu Wenruo 2019-11-15 3716 * Since SYSTEM bg is small, that's pretty common.
b12de52896c0e8 Qu Wenruo 2019-11-15 3717 * 2. New SYSTEM bg will be allocated
b12de52896c0e8 Qu Wenruo 2019-11-15 3718 * Due to regular version will allocate new chunk.
b12de52896c0e8 Qu Wenruo 2019-11-15 3719 * 3. New SYSTEM bg is empty and will get cleaned up
b12de52896c0e8 Qu Wenruo 2019-11-15 3720 * Before cleanup really happens, it's marked RO again.
b12de52896c0e8 Qu Wenruo 2019-11-15 3721 * 4. Empty SYSTEM bg get scrubbed
b12de52896c0e8 Qu Wenruo 2019-11-15 3722 * We go back to 2.
b12de52896c0e8 Qu Wenruo 2019-11-15 3723 *
b12de52896c0e8 Qu Wenruo 2019-11-15 3724 * This can easily boost the amount of SYSTEM chunks if cleaner
b12de52896c0e8 Qu Wenruo 2019-11-15 3725 * thread can't be triggered fast enough, and use up all space
b12de52896c0e8 Qu Wenruo 2019-11-15 3726 * of btrfs_super_block::sys_chunk_array
1bbb97b8ce7ddf Qu Wenruo 2020-01-24 3727 *
1bbb97b8ce7ddf Qu Wenruo 2020-01-24 3728 * While for dev replace, we need to try our best to mark block
1bbb97b8ce7ddf Qu Wenruo 2020-01-24 3729 * group RO, to prevent race between:
1bbb97b8ce7ddf Qu Wenruo 2020-01-24 3730 * - Write duplication
1bbb97b8ce7ddf Qu Wenruo 2020-01-24 3731 * Contains latest data
1bbb97b8ce7ddf Qu Wenruo 2020-01-24 3732 * - Scrub copy
1bbb97b8ce7ddf Qu Wenruo 2020-01-24 3733 * Contains data from commit tree
1bbb97b8ce7ddf Qu Wenruo 2020-01-24 3734 *
1bbb97b8ce7ddf Qu Wenruo 2020-01-24 3735 * If target block group is not marked RO, nocow writes can
1bbb97b8ce7ddf Qu Wenruo 2020-01-24 3736 * be overwritten by scrub copy, causing data corruption.
1bbb97b8ce7ddf Qu Wenruo 2020-01-24 3737 * So for dev-replace, it's not allowed to continue if a block
1bbb97b8ce7ddf Qu Wenruo 2020-01-24 3738 * group is not RO.
b12de52896c0e8 Qu Wenruo 2019-11-15 3739 */
1bbb97b8ce7ddf Qu Wenruo 2020-01-24 3740 ret = btrfs_inc_block_group_ro(cache, sctx->is_dev_replace);
de17addce7a20d Naohiro Aota 2021-02-04 3741 if (!ret && sctx->is_dev_replace) {
de17addce7a20d Naohiro Aota 2021-02-04 3742 ret = finish_extent_writes_for_zoned(root, cache);
de17addce7a20d Naohiro Aota 2021-02-04 3743 if (ret) {
de17addce7a20d Naohiro Aota 2021-02-04 3744 btrfs_dec_block_group_ro(cache);
de17addce7a20d Naohiro Aota 2021-02-04 3745 scrub_pause_off(fs_info);
de17addce7a20d Naohiro Aota 2021-02-04 3746 btrfs_put_block_group(cache);
de17addce7a20d Naohiro Aota 2021-02-04 3747 break;
de17addce7a20d Naohiro Aota 2021-02-04 3748 }
de17addce7a20d Naohiro Aota 2021-02-04 3749 }
de17addce7a20d Naohiro Aota 2021-02-04 3750
76a8efa171bf6c Zhaolei 2015-11-17 3751 if (ret == 0) {
76a8efa171bf6c Zhaolei 2015-11-17 3752 ro_set = 1;
1bbb97b8ce7ddf Qu Wenruo 2020-01-24 3753 } else if (ret == -ENOSPC && !sctx->is_dev_replace) {
76a8efa171bf6c Zhaolei 2015-11-17 3754 /*
76a8efa171bf6c Zhaolei 2015-11-17 3755 * btrfs_inc_block_group_ro return -ENOSPC when it
76a8efa171bf6c Zhaolei 2015-11-17 3756 * failed in creating new chunk for metadata.
1bbb97b8ce7ddf Qu Wenruo 2020-01-24 3757 * It is not a problem for scrub, because
76a8efa171bf6c Zhaolei 2015-11-17 3758 * metadata are always cowed, and our scrub paused
76a8efa171bf6c Zhaolei 2015-11-17 3759 * commit_transactions.
76a8efa171bf6c Zhaolei 2015-11-17 3760 */
76a8efa171bf6c Zhaolei 2015-11-17 3761 ro_set = 0;
195a49eaf655eb Filipe Manana 2021-02-05 3762 } else if (ret == -ETXTBSY) {
195a49eaf655eb Filipe Manana 2021-02-05 3763 btrfs_warn(fs_info,
195a49eaf655eb Filipe Manana 2021-02-05 3764 "skipping scrub of block group %llu due to active swapfile",
195a49eaf655eb Filipe Manana 2021-02-05 3765 cache->start);
195a49eaf655eb Filipe Manana 2021-02-05 3766 scrub_pause_off(fs_info);
195a49eaf655eb Filipe Manana 2021-02-05 3767 ret = 0;
195a49eaf655eb Filipe Manana 2021-02-05 3768 goto skip_unfreeze;
76a8efa171bf6c Zhaolei 2015-11-17 3769 } else {
5d163e0e68ce74 Jeff Mahoney 2016-09-20 3770 btrfs_warn(fs_info,
913e153572218c David Sterba 2017-07-13 3771 "failed setting block group ro: %d", ret);
6b7304af62d02d Filipe Manana 2020-05-08 3772 btrfs_unfreeze_block_group(cache);
55e3a601c81cdc Zhaolei 2015-08-05 3773 btrfs_put_block_group(cache);
1bbb97b8ce7ddf Qu Wenruo 2020-01-24 3774 scrub_pause_off(fs_info);
55e3a601c81cdc Zhaolei 2015-08-05 3775 break;
55e3a601c81cdc Zhaolei 2015-08-05 3776 }
55e3a601c81cdc Zhaolei 2015-08-05 3777
1bbb97b8ce7ddf Qu Wenruo 2020-01-24 3778 /*
1bbb97b8ce7ddf Qu Wenruo 2020-01-24 3779 * Now the target block is marked RO, wait for nocow writes to
1bbb97b8ce7ddf Qu Wenruo 2020-01-24 3780 * finish before dev-replace.
1bbb97b8ce7ddf Qu Wenruo 2020-01-24 3781 * COW is fine, as COW never overwrites extents in commit tree.
1bbb97b8ce7ddf Qu Wenruo 2020-01-24 3782 */
1bbb97b8ce7ddf Qu Wenruo 2020-01-24 3783 if (sctx->is_dev_replace) {
1bbb97b8ce7ddf Qu Wenruo 2020-01-24 3784 btrfs_wait_nocow_writers(cache);
1bbb97b8ce7ddf Qu Wenruo 2020-01-24 3785 btrfs_wait_ordered_roots(fs_info, U64_MAX, cache->start,
1bbb97b8ce7ddf Qu Wenruo 2020-01-24 3786 cache->length);
1bbb97b8ce7ddf Qu Wenruo 2020-01-24 3787 }
1bbb97b8ce7ddf Qu Wenruo 2020-01-24 3788
1bbb97b8ce7ddf Qu Wenruo 2020-01-24 3789 scrub_pause_off(fs_info);
3ec17a67cc340b Dan Carpenter 2019-10-31 3790 down_write(&dev_replace->rwsem);
ff023aac31198e Stefan Behrens 2012-11-06 3791 dev_replace->cursor_right = found_key.offset + length;
ff023aac31198e Stefan Behrens 2012-11-06 3792 dev_replace->cursor_left = found_key.offset;
ff023aac31198e Stefan Behrens 2012-11-06 3793 dev_replace->item_needs_writeback = 1;
cb5583dd52fab4 David Sterba 2018-09-07 3794 up_write(&dev_replace->rwsem);
cb5583dd52fab4 David Sterba 2018-09-07 3795
8c204c9657c32e Zhao Lei 2015-08-19 3796 ret = scrub_chunk(sctx, scrub_dev, chunk_offset, length,
32934280967d00 Omar Sandoval 2018-08-14 3797 found_key.offset, cache);
ff023aac31198e Stefan Behrens 2012-11-06 3798
ff023aac31198e Stefan Behrens 2012-11-06 3799 /*
ff023aac31198e Stefan Behrens 2012-11-06 3800 * flush, submit all pending read and write bios, afterwards
ff023aac31198e Stefan Behrens 2012-11-06 3801 * wait for them.
ff023aac31198e Stefan Behrens 2012-11-06 3802 * Note that in the dev replace case, a read request causes
ff023aac31198e Stefan Behrens 2012-11-06 3803 * write requests that are submitted in the read completion
ff023aac31198e Stefan Behrens 2012-11-06 3804 * worker. Therefore in the current situation, it is required
ff023aac31198e Stefan Behrens 2012-11-06 3805 * that all write requests are flushed, so that all read and
ff023aac31198e Stefan Behrens 2012-11-06 3806 * write requests are really completed when bios_in_flight
ff023aac31198e Stefan Behrens 2012-11-06 3807 * changes to 0.
ff023aac31198e Stefan Behrens 2012-11-06 3808 */
2073c4c2e51a93 David Sterba 2017-03-31 3809 sctx->flush_all_writes = true;
ff023aac31198e Stefan Behrens 2012-11-06 3810 scrub_submit(sctx);
3fb99303c64e31 David Sterba 2017-05-16 3811 mutex_lock(&sctx->wr_lock);
ff023aac31198e Stefan Behrens 2012-11-06 3812 scrub_wr_submit(sctx);
3fb99303c64e31 David Sterba 2017-05-16 3813 mutex_unlock(&sctx->wr_lock);
ff023aac31198e Stefan Behrens 2012-11-06 3814
ff023aac31198e Stefan Behrens 2012-11-06 3815 wait_event(sctx->list_wait,
ff023aac31198e Stefan Behrens 2012-11-06 3816 atomic_read(&sctx->bios_in_flight) == 0);
b708ce969af3ce Zhaolei 2015-08-05 3817
b708ce969af3ce Zhaolei 2015-08-05 3818 scrub_pause_on(fs_info);
12cf93728dfba2 Wang Shilong 2014-02-19 3819
12cf93728dfba2 Wang Shilong 2014-02-19 3820 /*
12cf93728dfba2 Wang Shilong 2014-02-19 3821 * must be called before we decrease @scrub_paused.
12cf93728dfba2 Wang Shilong 2014-02-19 3822 * make sure we don't block transaction commit while
12cf93728dfba2 Wang Shilong 2014-02-19 3823 * we are waiting pending workers finished.
12cf93728dfba2 Wang Shilong 2014-02-19 3824 */
ff023aac31198e Stefan Behrens 2012-11-06 3825 wait_event(sctx->list_wait,
ff023aac31198e Stefan Behrens 2012-11-06 3826 atomic_read(&sctx->workers_pending) == 0);
2073c4c2e51a93 David Sterba 2017-03-31 3827 sctx->flush_all_writes = false;
12cf93728dfba2 Wang Shilong 2014-02-19 3828
b708ce969af3ce Zhaolei 2015-08-05 3829 scrub_pause_off(fs_info);
ff023aac31198e Stefan Behrens 2012-11-06 3830
78ce9fc269af6e Naohiro Aota 2021-02-04 3831 if (sctx->is_dev_replace &&
78ce9fc269af6e Naohiro Aota 2021-02-04 3832 !btrfs_finish_block_group_to_copy(dev_replace->srcdev,
78ce9fc269af6e Naohiro Aota 2021-02-04 3833 cache, found_key.offset))
78ce9fc269af6e Naohiro Aota 2021-02-04 3834 ro_set = 0;
78ce9fc269af6e Naohiro Aota 2021-02-04 3835
78ce9fc269af6e Naohiro Aota 2021-02-04 @3836 done:
3ec17a67cc340b Dan Carpenter 2019-10-31 3837 down_write(&dev_replace->rwsem);
1a1a8b732c7e95 Filipe Manana 2016-05-14 3838 dev_replace->cursor_left = dev_replace->cursor_right;
1a1a8b732c7e95 Filipe Manana 2016-05-14 3839 dev_replace->item_needs_writeback = 1;
3ec17a67cc340b Dan Carpenter 2019-10-31 3840 up_write(&dev_replace->rwsem);
1a1a8b732c7e95 Filipe Manana 2016-05-14 3841
76a8efa171bf6c Zhaolei 2015-11-17 3842 if (ro_set)
2ff7e61e0d30ff Jeff Mahoney 2016-06-22 3843 btrfs_dec_block_group_ro(cache);
ff023aac31198e Stefan Behrens 2012-11-06 3844
758f2dfcf8a249 Filipe Manana 2015-11-19 3845 /*
758f2dfcf8a249 Filipe Manana 2015-11-19 3846 * We might have prevented the cleaner kthread from deleting
758f2dfcf8a249 Filipe Manana 2015-11-19 3847 * this block group if it was already unused because we raced
758f2dfcf8a249 Filipe Manana 2015-11-19 3848 * and set it to RO mode first. So add it back to the unused
758f2dfcf8a249 Filipe Manana 2015-11-19 3849 * list, otherwise it might not ever be deleted unless a manual
758f2dfcf8a249 Filipe Manana 2015-11-19 3850 * balance is triggered or it becomes used and unused again.
758f2dfcf8a249 Filipe Manana 2015-11-19 3851 */
758f2dfcf8a249 Filipe Manana 2015-11-19 3852 spin_lock(&cache->lock);
758f2dfcf8a249 Filipe Manana 2015-11-19 3853 if (!cache->removed && !cache->ro && cache->reserved == 0 &&
bf38be65f3703d David Sterba 2019-10-23 3854 cache->used == 0) {
758f2dfcf8a249 Filipe Manana 2015-11-19 3855 spin_unlock(&cache->lock);
6e80d4f8c422d3 Dennis Zhou 2019-12-13 3856 if (btrfs_test_opt(fs_info, DISCARD_ASYNC))
6e80d4f8c422d3 Dennis Zhou 2019-12-13 3857 btrfs_discard_queue_work(&fs_info->discard_ctl,
6e80d4f8c422d3 Dennis Zhou 2019-12-13 3858 cache);
6e80d4f8c422d3 Dennis Zhou 2019-12-13 3859 else
031f24da2c8a7b Qu Wenruo 2018-05-22 3860 btrfs_mark_bg_unused(cache);
758f2dfcf8a249 Filipe Manana 2015-11-19 3861 } else {
758f2dfcf8a249 Filipe Manana 2015-11-19 3862 spin_unlock(&cache->lock);
758f2dfcf8a249 Filipe Manana 2015-11-19 3863 }
195a49eaf655eb Filipe Manana 2021-02-05 3864 skip_unfreeze:
6b7304af62d02d Filipe Manana 2020-05-08 3865 btrfs_unfreeze_block_group(cache);
a2de733c78fa7a Arne Jansen 2011-03-08 3866 btrfs_put_block_group(cache);
a2de733c78fa7a Arne Jansen 2011-03-08 3867 if (ret)
a2de733c78fa7a Arne Jansen 2011-03-08 3868 break;
32934280967d00 Omar Sandoval 2018-08-14 3869 if (sctx->is_dev_replace &&
af1be4f851db4f Stefan Behrens 2012-11-27 3870 atomic64_read(&dev_replace->num_write_errors) > 0) {
ff023aac31198e Stefan Behrens 2012-11-06 3871 ret = -EIO;
ff023aac31198e Stefan Behrens 2012-11-06 3872 break;
ff023aac31198e Stefan Behrens 2012-11-06 3873 }
ff023aac31198e Stefan Behrens 2012-11-06 3874 if (sctx->stat.malloc_errors > 0) {
ff023aac31198e Stefan Behrens 2012-11-06 3875 ret = -ENOMEM;
ff023aac31198e Stefan Behrens 2012-11-06 3876 break;
ff023aac31198e Stefan Behrens 2012-11-06 3877 }
ced96edc48ba45 Qu Wenruo 2014-06-19 3878 skip:
a2de733c78fa7a Arne Jansen 2011-03-08 3879 key.offset = found_key.offset + length;
712673339a0d08 Chris Mason 2011-05-23 3880 btrfs_release_path(path);
a2de733c78fa7a Arne Jansen 2011-03-08 3881 }
a2de733c78fa7a Arne Jansen 2011-03-08 3882
a2de733c78fa7a Arne Jansen 2011-03-08 3883 btrfs_free_path(path);
8c51032f978bac Arne Jansen 2011-06-03 3884
55e3a601c81cdc Zhaolei 2015-08-05 3885 return ret;
a2de733c78fa7a Arne Jansen 2011-03-08 3886 }
a2de733c78fa7a Arne Jansen 2011-03-08 3887
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
Re: [PATCH] mac80211: fix NULL ptr dereference during mesh peer connection for non HE devices
by kernel test robot
Hi Abinaya,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on mac80211-next/master]
[also build test WARNING on mac80211/master linus/master v5.12-rc7 next-20210414]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Abinaya-Kalaiselvan/mac80211-fix...
base: https://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git master
config: x86_64-randconfig-m001-20210414 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
New smatch warnings:
net/mac80211/he.c:126 ieee80211_he_cap_ie_to_sta_he_cap() warn: inconsistent indenting
Old smatch warnings:
net/mac80211/he.c:33 ieee80211_update_from_he_6ghz_capa() error: uninitialized symbol 'smps_mode'.
vim +126 net/mac80211/he.c
105
106 void
107 ieee80211_he_cap_ie_to_sta_he_cap(struct ieee80211_sub_if_data *sdata,
108 struct ieee80211_supported_band *sband,
109 const u8 *he_cap_ie, u8 he_cap_len,
110 const struct ieee80211_he_6ghz_capa *he_6ghz_capa,
111 struct sta_info *sta)
112 {
113 struct ieee80211_sta_he_cap *he_cap = &sta->sta.he_cap;
114 struct ieee80211_sta_he_cap own_he_cap;
115 struct ieee80211_he_cap_elem *he_cap_ie_elem = (void *)he_cap_ie;
116 u8 he_ppe_size;
117 u8 mcs_nss_size;
118 u8 he_total_size;
119 bool own_160, peer_160, own_80p80, peer_80p80;
120
121 memset(he_cap, 0, sizeof(*he_cap));
122
123 if (!he_cap_ie || !ieee80211_get_he_sta_cap(sband))
124 return;
125
> 126 own_he_cap = sband->iftype_data->he_cap;
127
128 /* Make sure size is OK */
129 mcs_nss_size = ieee80211_he_mcs_nss_size(he_cap_ie_elem);
130 he_ppe_size =
131 ieee80211_he_ppe_size(he_cap_ie[sizeof(he_cap->he_cap_elem) +
132 mcs_nss_size],
133 he_cap_ie_elem->phy_cap_info);
134 he_total_size = sizeof(he_cap->he_cap_elem) + mcs_nss_size +
135 he_ppe_size;
136 if (he_cap_len < he_total_size)
137 return;
138
139 memcpy(&he_cap->he_cap_elem, he_cap_ie, sizeof(he_cap->he_cap_elem));
140
141 /* HE Tx/Rx HE MCS NSS Support Field */
142 memcpy(&he_cap->he_mcs_nss_supp,
143 &he_cap_ie[sizeof(he_cap->he_cap_elem)], mcs_nss_size);
144
145 /* Check if there are (optional) PPE Thresholds */
146 if (he_cap->he_cap_elem.phy_cap_info[6] &
147 IEEE80211_HE_PHY_CAP6_PPE_THRESHOLD_PRESENT)
148 memcpy(he_cap->ppe_thres,
149 &he_cap_ie[sizeof(he_cap->he_cap_elem) + mcs_nss_size],
150 he_ppe_size);
151
152 he_cap->has_he = true;
153
154 sta->cur_max_bandwidth = ieee80211_sta_cap_rx_bw(sta);
155 sta->sta.bandwidth = ieee80211_sta_cur_vht_bw(sta);
156
157 if (sband->band == NL80211_BAND_6GHZ && he_6ghz_capa)
158 ieee80211_update_from_he_6ghz_capa(he_6ghz_capa, sta);
159
160 ieee80211_he_mcs_intersection(&own_he_cap.he_mcs_nss_supp.rx_mcs_80,
161 &he_cap->he_mcs_nss_supp.rx_mcs_80,
162 &own_he_cap.he_mcs_nss_supp.tx_mcs_80,
163 &he_cap->he_mcs_nss_supp.tx_mcs_80);
164
165 own_160 = own_he_cap.he_cap_elem.phy_cap_info[0] &
166 IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_160MHZ_IN_5G;
167 peer_160 = he_cap->he_cap_elem.phy_cap_info[0] &
168 IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_160MHZ_IN_5G;
169
170 if (peer_160 && own_160) {
171 ieee80211_he_mcs_intersection(&own_he_cap.he_mcs_nss_supp.rx_mcs_160,
172 &he_cap->he_mcs_nss_supp.rx_mcs_160,
173 &own_he_cap.he_mcs_nss_supp.tx_mcs_160,
174 &he_cap->he_mcs_nss_supp.tx_mcs_160);
175 } else if (peer_160 && !own_160) {
176 ieee80211_he_mcs_disable(&he_cap->he_mcs_nss_supp.rx_mcs_160);
177 ieee80211_he_mcs_disable(&he_cap->he_mcs_nss_supp.tx_mcs_160);
178 he_cap->he_cap_elem.phy_cap_info[0] &=
179 ~IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_160MHZ_IN_5G;
180 }
181
182 own_80p80 = own_he_cap.he_cap_elem.phy_cap_info[0] &
183 IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_80PLUS80_MHZ_IN_5G;
184 peer_80p80 = he_cap->he_cap_elem.phy_cap_info[0] &
185 IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_80PLUS80_MHZ_IN_5G;
186
187 if (peer_80p80 && own_80p80) {
188 ieee80211_he_mcs_intersection(&own_he_cap.he_mcs_nss_supp.rx_mcs_80p80,
189 &he_cap->he_mcs_nss_supp.rx_mcs_80p80,
190 &own_he_cap.he_mcs_nss_supp.tx_mcs_80p80,
191 &he_cap->he_mcs_nss_supp.tx_mcs_80p80);
192 } else if (peer_80p80 && !own_80p80) {
193 ieee80211_he_mcs_disable(&he_cap->he_mcs_nss_supp.rx_mcs_80p80);
194 ieee80211_he_mcs_disable(&he_cap->he_mcs_nss_supp.tx_mcs_80p80);
195 he_cap->he_cap_elem.phy_cap_info[0] &=
196 ~IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_80PLUS80_MHZ_IN_5G;
197 }
198 }
199
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
[bvanassche:scsi-for-next 41/41] drivers/scsi/ibmvscsi/ibmvfc.c:1956:51: warning: format '%d' expects argument of type 'int', but argument 4 has type 'union scsi_status'
by kernel test robot
tree: https://github.com/bvanassche/linux scsi-for-next
head: d8044d773ae9d9e70f9c61f98296c6c8391447ad
commit: d8044d773ae9d9e70f9c61f98296c6c8391447ad [41/41] Change the return type of fc_remote_port_chkready() into union scsi_status
config: powerpc-allyesconfig (attached as .config)
compiler: powerpc64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/bvanassche/linux/commit/d8044d773ae9d9e70f9c61f98296c6...
git remote add bvanassche https://github.com/bvanassche/linux
git fetch --no-tags bvanassche scsi-for-next
git checkout d8044d773ae9d9e70f9c61f98296c6c8391447ad
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
drivers/scsi/ibmvscsi/ibmvfc.c: In function 'ibmvfc_get_err_result':
drivers/scsi/ibmvscsi/ibmvfc.c:348:52: error: request for member 'combined' in something not a structure or union
348 | return rsp->scsi_status | (cmd_status[err].result.combined << 16);
| ^
In file included from include/linux/kernel.h:10,
from include/linux/list.h:9,
from include/linux/module.h:12,
from drivers/scsi/ibmvscsi/ibmvfc.c:10:
drivers/scsi/ibmvscsi/ibmvfc.c: In function 'ibmvfc_queuecommand':
include/linux/compiler.h:78:40: error: wrong type argument to unary exclamation mark
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
drivers/scsi/ibmvscsi/ibmvfc.c:1916:6: note: in expansion of macro 'unlikely'
1916 | if (unlikely((rc = fc_remote_port_chkready(rport))) ||
| ^~~~~~~~
include/linux/compiler.h:78:40: error: wrong type argument to unary exclamation mark
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
drivers/scsi/ibmvscsi/ibmvfc.c:1917:6: note: in expansion of macro 'unlikely'
1917 | unlikely((rc = ibmvfc_host_chkready(vhost)))) {
| ^~~~~~~~
drivers/scsi/ibmvscsi/ibmvfc.c:1947:20: error: incompatible types when assigning to type 'union scsi_status' from type 'int'
1947 | if (likely(!(rc = ibmvfc_map_sg_data(cmnd, evt, vfc_cmd, vhost->dev))))
| ^~~~~~~~~~~~~~~~~~
include/linux/compiler.h:77:40: note: in definition of macro 'likely'
77 | # define likely(x) __builtin_expect(!!(x), 1)
| ^
drivers/scsi/ibmvscsi/ibmvfc.c:1951:9: error: invalid operands to binary == (have 'union scsi_status' and 'int')
1951 | if (rc == -ENOMEM)
| ^~
>> drivers/scsi/ibmvscsi/ibmvfc.c:1956:51: warning: format '%d' expects argument of type 'int', but argument 4 has type 'union scsi_status' [-Wformat=]
1956 | "Failed to map DMA buffer for command. rc=%d\n", rc);
| ~^ ~~
| | |
| int union scsi_status
In file included from include/linux/kernel.h:10,
from include/linux/list.h:9,
from include/linux/module.h:12,
from drivers/scsi/ibmvscsi/ibmvfc.c:10:
drivers/scsi/ibmvscsi/ibmvfc.c: In function 'ibmvfc_bsg_plogi':
drivers/scsi/ibmvscsi/ibmvfc.c:2071:21: error: incompatible types when assigning to type 'int' from type 'union scsi_status'
2071 | if (unlikely((rc = ibmvfc_host_chkready(vhost))))
| ^~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
drivers/scsi/ibmvscsi/ibmvfc.c: In function 'ibmvfc_bsg_request':
drivers/scsi/ibmvscsi/ibmvfc.c:2241:29: error: incompatible type for argument 2 of 'bsg_job_done'
2241 | bsg_job_done(job, bsg_reply->result,
| ~~~~~~~~~^~~~~~~~
| |
| union scsi_status
In file included from drivers/scsi/ibmvscsi/ibmvfc.c:21:
include/linux/bsg-lib.h:65:44: note: expected 'int' but argument is of type 'union scsi_status'
65 | void bsg_job_done(struct bsg_job *job, int result,
| ~~~~^~~~~~
drivers/scsi/ibmvscsi/ibmvfc.c: In function 'ibmvfc_slave_alloc':
drivers/scsi/ibmvscsi/ibmvfc.c:3308:13: error: invalid operands to binary || (have 'int' and 'union scsi_status')
3308 | if (!rport || fc_remote_port_chkready(rport))
| ~~~~~~ ^~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| int union scsi_status
vim +1956 drivers/scsi/ibmvscsi/ibmvfc.c
fad74a1be2dbea Tyrel Datwyler 2020-11-17 1895
072b91f9c6510d Brian King 2008-07-01 1896 /**
072b91f9c6510d Brian King 2008-07-01 1897 * ibmvfc_queuecommand - The queuecommand function of the scsi template
dd9c772971485d Lee Jones 2021-03-17 1898 * @shost: scsi host struct
072b91f9c6510d Brian King 2008-07-01 1899 * @cmnd: struct scsi_cmnd to be executed
072b91f9c6510d Brian King 2008-07-01 1900 *
072b91f9c6510d Brian King 2008-07-01 1901 * Returns:
072b91f9c6510d Brian King 2008-07-01 1902 * 0 on success / other on failure
072b91f9c6510d Brian King 2008-07-01 1903 **/
654080d02edb60 Tyrel Datwyler 2021-01-06 1904 static int ibmvfc_queuecommand(struct Scsi_Host *shost, struct scsi_cmnd *cmnd)
072b91f9c6510d Brian King 2008-07-01 1905 {
654080d02edb60 Tyrel Datwyler 2021-01-06 1906 struct ibmvfc_host *vhost = shost_priv(shost);
072b91f9c6510d Brian King 2008-07-01 1907 struct fc_rport *rport = starget_to_rport(scsi_target(cmnd->device));
072b91f9c6510d Brian King 2008-07-01 1908 struct ibmvfc_cmd *vfc_cmd;
5a9d16f71c264a Tyrel Datwyler 2020-11-17 1909 struct ibmvfc_fcp_cmd_iu *iu;
072b91f9c6510d Brian King 2008-07-01 1910 struct ibmvfc_event *evt;
cb72477be7290c Tyrel Datwyler 2021-01-14 1911 u32 tag_and_hwq = blk_mq_unique_tag(cmnd->request);
cb72477be7290c Tyrel Datwyler 2021-01-14 1912 u16 hwq = blk_mq_unique_tag_to_hwq(tag_and_hwq);
31750fbd7b6dec Tyrel Datwyler 2021-01-14 1913 u16 scsi_channel;
d8044d773ae9d9 Bart Van Assche 2021-04-13 1914 union scsi_status rc;
072b91f9c6510d Brian King 2008-07-01 1915
072b91f9c6510d Brian King 2008-07-01 1916 if (unlikely((rc = fc_remote_port_chkready(rport))) ||
072b91f9c6510d Brian King 2008-07-01 1917 unlikely((rc = ibmvfc_host_chkready(vhost)))) {
d8044d773ae9d9 Bart Van Assche 2021-04-13 1918 cmnd->result = rc;
654080d02edb60 Tyrel Datwyler 2021-01-06 1919 cmnd->scsi_done(cmnd);
072b91f9c6510d Brian King 2008-07-01 1920 return 0;
072b91f9c6510d Brian King 2008-07-01 1921 }
072b91f9c6510d Brian King 2008-07-01 1922
fd78f07ace9e37 Bart Van Assche 2021-04-09 1923 cmnd->result.combined = (DID_OK << 16);
31750fbd7b6dec Tyrel Datwyler 2021-01-14 1924 if (vhost->using_channels) {
31750fbd7b6dec Tyrel Datwyler 2021-01-14 1925 scsi_channel = hwq % vhost->scsi_scrqs.active_queues;
31750fbd7b6dec Tyrel Datwyler 2021-01-14 1926 evt = ibmvfc_get_event(&vhost->scsi_scrqs.scrqs[scsi_channel]);
31750fbd7b6dec Tyrel Datwyler 2021-01-14 1927 evt->hwq = hwq % vhost->scsi_scrqs.active_queues;
31750fbd7b6dec Tyrel Datwyler 2021-01-14 1928 } else
e4b26f3db86498 Tyrel Datwyler 2021-01-06 1929 evt = ibmvfc_get_event(&vhost->crq);
31750fbd7b6dec Tyrel Datwyler 2021-01-14 1930
072b91f9c6510d Brian King 2008-07-01 1931 ibmvfc_init_event(evt, ibmvfc_scsi_done, IBMVFC_CMD_FORMAT);
072b91f9c6510d Brian King 2008-07-01 1932 evt->cmnd = cmnd;
fad74a1be2dbea Tyrel Datwyler 2020-11-17 1933
fad74a1be2dbea Tyrel Datwyler 2020-11-17 1934 vfc_cmd = ibmvfc_init_vfc_cmd(evt, cmnd->device);
5a9d16f71c264a Tyrel Datwyler 2020-11-17 1935 iu = ibmvfc_get_fcp_iu(vhost, vfc_cmd);
fad74a1be2dbea Tyrel Datwyler 2020-11-17 1936
5a9d16f71c264a Tyrel Datwyler 2020-11-17 1937 iu->xfer_len = cpu_to_be32(scsi_bufflen(cmnd));
5a9d16f71c264a Tyrel Datwyler 2020-11-17 1938 memcpy(iu->cdb, cmnd->cmnd, cmnd->cmd_len);
072b91f9c6510d Brian King 2008-07-01 1939
5066863337afdb Christoph Hellwig 2014-10-30 1940 if (cmnd->flags & SCMD_TAGGED) {
5066863337afdb Christoph Hellwig 2014-10-30 1941 vfc_cmd->task_tag = cpu_to_be64(cmnd->tag);
5a9d16f71c264a Tyrel Datwyler 2020-11-17 1942 iu->pri_task_attr = IBMVFC_SIMPLE_TASK;
072b91f9c6510d Brian King 2008-07-01 1943 }
072b91f9c6510d Brian King 2008-07-01 1944
901d01c8e50c35 Tyrel Datwyler 2021-01-06 1945 vfc_cmd->correlation = cpu_to_be64((u64)evt);
2aa0102c668830 Tyrel Datwyler 2020-11-17 1946
072b91f9c6510d Brian King 2008-07-01 1947 if (likely(!(rc = ibmvfc_map_sg_data(cmnd, evt, vfc_cmd, vhost->dev))))
072b91f9c6510d Brian King 2008-07-01 1948 return ibmvfc_send_event(evt, vhost, 0);
072b91f9c6510d Brian King 2008-07-01 1949
072b91f9c6510d Brian King 2008-07-01 1950 ibmvfc_free_event(evt);
072b91f9c6510d Brian King 2008-07-01 1951 if (rc == -ENOMEM)
072b91f9c6510d Brian King 2008-07-01 1952 return SCSI_MLQUEUE_HOST_BUSY;
072b91f9c6510d Brian King 2008-07-01 1953
072b91f9c6510d Brian King 2008-07-01 1954 if (vhost->log_level > IBMVFC_DEFAULT_LOG_LEVEL)
072b91f9c6510d Brian King 2008-07-01 1955 scmd_printk(KERN_ERR, cmnd,
072b91f9c6510d Brian King 2008-07-01 @1956 "Failed to map DMA buffer for command. rc=%d\n", rc);
072b91f9c6510d Brian King 2008-07-01 1957
fd78f07ace9e37 Bart Van Assche 2021-04-09 1958 cmnd->result.combined = DID_ERROR << 16;
654080d02edb60 Tyrel Datwyler 2021-01-06 1959 cmnd->scsi_done(cmnd);
072b91f9c6510d Brian King 2008-07-01 1960 return 0;
072b91f9c6510d Brian King 2008-07-01 1961 }
072b91f9c6510d Brian King 2008-07-01 1962
:::::: The code at line 1956 was first introduced by commit
:::::: 072b91f9c6510d0ec4a49d07dbc318760c7da7b3 [SCSI] ibmvfc: IBM Power Virtual Fibre Channel Adapter Client Driver
:::::: TO: Brian King <brking(a)linux.vnet.ibm.com>
:::::: CC: James Bottomley <James.Bottomley(a)HansenPartnership.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
Re: [PATCH v18 1/5] i2c: core: support bus regulator controlling in adapter
by kernel test robot
Hi Hsin-Yi,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on next-20210413]
[also build test ERROR on v5.12-rc7]
[cannot apply to wsa/i2c/for-next robh/for-next char-misc/char-misc-testing mediatek/for-next v5.12-rc7 v5.12-rc6 v5.12-rc5]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Hsin-Yi-Wang/add-power-control-i...
base: dcf1b51d6b2ac5da234ae6883ed0e9422c339588
config: i386-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/0day-ci/linux/commit/bdc2a0f5916e6855282b62026e7ba8343...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Hsin-Yi-Wang/add-power-control-in-i2c/20210414-164337
git checkout bdc2a0f5916e6855282b62026e7ba83432859dac
# save the attached .config to linux build tree
make W=1 W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from drivers/gpu/drm/i915/i915_gem.c:1251:
>> drivers/gpu/drm/i915/selftests/i915_gem.c:97:13: error: conflicting types for 'pm_suspend'
97 | static void pm_suspend(struct drm_i915_private *i915)
| ^~~~~~~~~~
In file included from include/linux/regulator/consumer.h:35,
from include/linux/i2c.h:18,
from drivers/gpu/drm/i915/i915_drv.h:39,
from drivers/gpu/drm/i915/gt/intel_context.h:14,
from drivers/gpu/drm/i915/gem/i915_gem_context.h:12,
from drivers/gpu/drm/i915/i915_gem.c:44:
include/linux/suspend.h:331:12: note: previous declaration of 'pm_suspend' was here
331 | extern int pm_suspend(suspend_state_t state);
| ^~~~~~~~~~
vim +/pm_suspend +97 drivers/gpu/drm/i915/selftests/i915_gem.c
3f51b7e1f36a37 Chris Wilson 2018-08-30 96
3f51b7e1f36a37 Chris Wilson 2018-08-30 @97 static void pm_suspend(struct drm_i915_private *i915)
3f51b7e1f36a37 Chris Wilson 2018-08-30 98 {
c9d08cc3e3393e Chris Wilson 2019-01-14 99 intel_wakeref_t wakeref;
c9d08cc3e3393e Chris Wilson 2019-01-14 100
c447ff7db34807 Daniele Ceraolo Spurio 2019-06-13 101 with_intel_runtime_pm(&i915->runtime_pm, wakeref) {
e986209c67024c Chris Wilson 2020-01-30 102 i915_ggtt_suspend(&i915->ggtt);
3f51b7e1f36a37 Chris Wilson 2018-08-30 103 i915_gem_suspend_late(i915);
d4225a535b3b08 Chris Wilson 2019-01-14 104 }
3f51b7e1f36a37 Chris Wilson 2018-08-30 105 }
3f51b7e1f36a37 Chris Wilson 2018-08-30 106
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months