Re: [PATCH] staging: dgap: dgap.c: fixed whitespace error caused by my patch
On Sat, Mar 12, 2016 at 05:10:29PM -0800, Gavin O'Leary wrote: > Signed-off-by: Gavin O'Leary > --- > drivers/staging/dgap/dgap.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/dgap/dgap.c b/drivers/staging/dgap/dgap.c > index 9e07a39..7845516 100644 > --- a/drivers/staging/dgap/dgap.c > +++ b/drivers/staging/dgap/dgap.c > @@ -4819,7 +4819,7 @@ static int dgap_tty_ioctl(struct tty_struct *tty, > unsigned int cmd, > > case TCSBRKP: > /* support for POSIX tcsendbreak() > - * > + * No, you need to fix up your previous patch and get it right. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: dgap: dgap.c: Fixed a comment warning
On Sat, Mar 12, 2016 at 05:03:01PM -0800, Gavin O'Leary wrote: > Signed-off-by: Gavin O'Leary I can't take a patch without a changelog entry. greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v3 0/5] staging: unisys: visorbus: cleanup gotos in visorbus_main.c
This patchset cleans up the gotos found in visorbus_main.c v3 changes: - Fixed compile bug in rename create_visor_device gotos by changing rc to err v2 changes: - Added patch from Tim Sell that remove sysfs devmajorminor, which allowed us to remove two different patches from original patchset since the functions they patch no longer exist. - Reworked the function visordriver_prove_device so gotos are no longer needed. David Kershner (4): staging: unisys: visorbus: Fix up visordriver_probe staging: unisys: visorbus: fix up gotos in visorbus_init staging: unisys: visorbus: Remove gotos in visorbus_match staging: unisys: visorbus: rename create_visor_device gotos Tim Sell (1): staging: unisys: visorbus: remove unused sysfs attribute devmajorminor/* drivers/staging/unisys/Documentation/overview.txt | 19 -- drivers/staging/unisys/include/visorbus.h | 3 - drivers/staging/unisys/visorbus/visorbus_main.c | 292 -- 3 files changed, 42 insertions(+), 272 deletions(-) -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v3 2/5] staging: unisys: visorbus: remove unused sysfs attribute devmajorminor/*
From: Tim Sell The sysfs attribute directory at: /sys/bus/visorbus/devices/vbus:dev/devmajorminor/* or /sys/devices/visorbus/vbus:dev/devmajorminor/* previously provided a location where a visorbus function driver could publish information (for usermode use) about possibly-multiple major and minor device numbers for character devices created for a each visorbus device, using visorbus_registerdevnode(). This functionality is not currently used, so it has been removed by this cset. Signed-off-by: Tim Sell Signed-off-by: David Kershner --- drivers/staging/unisys/Documentation/overview.txt | 19 --- drivers/staging/unisys/include/visorbus.h | 3 - drivers/staging/unisys/visorbus/visorbus_main.c | 194 -- 3 files changed, 216 deletions(-) diff --git a/drivers/staging/unisys/Documentation/overview.txt b/drivers/staging/unisys/Documentation/overview.txt index c2d8dd4..1146c1c 100644 --- a/drivers/staging/unisys/Documentation/overview.txt +++ b/drivers/staging/unisys/Documentation/overview.txt @@ -137,12 +137,6 @@ called automatically by the visorbus driver at appropriate times: * The resume() function is the "book-end" to pause(), and is described above. -If/when a function driver creates a Linux device (that needs to be accessed -from usermode), it calls visorbus_registerdevnode(), passing the major and -minor number of the device. (Of course not all function drivers will need -to do this.) This simply creates the appropriate "devmajorminor" sysfs entry -described below, so that a hotplug script can use it to create a device node. - 2.1.3. sysfs Advertised Information --- @@ -197,19 +191,6 @@ The following files exist under /sys/devices/visorbus/vbus:dev: if the appropriate function driver has not been loaded yet. -devmajorminor - - if applicable, each file here identifies (via -... its file contents) the - ":" needed for a device node to - enable access from usermode. There is exactly - one file here for each different device node - that can be accessed (from usermode). Note - that this info is provided by a particular - function driver, so these will not exist - until AFTER the appropriate function driver - controlling this device class is loaded. - channel properties of the device channel (all in ascii text format) diff --git a/drivers/staging/unisys/include/visorbus.h b/drivers/staging/unisys/include/visorbus.h index 2a64a9c..9c47a13 100644 --- a/drivers/staging/unisys/include/visorbus.h +++ b/drivers/staging/unisys/include/visorbus.h @@ -136,7 +136,6 @@ struct visor_device { struct periodic_work *periodic_work; bool being_removed; bool responded_to_device_create; - struct kobject kobjdevmajorminor; /* visorbus/dev/devmajorminor/*/ struct { int major, minor; void *attr; /* private use by devmajorminor_attr.c you can @@ -174,8 +173,6 @@ int visorbus_write_channel(struct visor_device *dev, unsigned long nbytes); int visorbus_clear_channel(struct visor_device *dev, unsigned long offset, u8 ch, unsigned long nbytes); -int visorbus_registerdevnode(struct visor_device *dev, -const char *name, int major, int minor); void visorbus_enable_channel_interrupts(struct visor_device *dev); void visorbus_disable_channel_interrupts(struct visor_device *dev); #endif diff --git a/drivers/staging/unisys/visorbus/visorbus_main.c b/drivers/staging/unisys/visorbus/visorbus_main.c index 6a12829..813d29e 100644 --- a/drivers/staging/unisys/visorbus/visorbus_main.c +++ b/drivers/staging/unisys/visorbus/visorbus_main.c @@ -243,180 +243,6 @@ visorbus_release_device(struct device *xdev) kfree(dev); } -/* Implement publishing of device node attributes under: - * - * /sys/bus/visorbus/dev/devmajorminor - * - */ - -#define to_devmajorminor_attr(_attr) \ - container_of(_attr, struct devmajorminor_attribute, attr) -#define to_visor_device_from_kobjdevmajorminor(obj) \ - container_of(obj, struct visor_device, kobjdevmajorminor) - -struct devmajorminor_attribute { - struct attribute attr; - int slot; - ssize_t (*show)(struct visor_device *, int slot, char *buf); - ssize_t (*store)(struct visor_device *, int slot, const char *buf, -size_t count); -}; - -static ssize_t DEVMAJORMINOR_ATTR(struct visor_device *dev, int slot, char *buf) -{ - int maxdevnodes = ARRAY_SIZE(dev->devnodes) / sizeof(dev->devnodes[0]); - -
[PATCH v3 4/5] staging: unisys: visorbus: Remove gotos in visorbus_match
Gotos in visorbus_match are not needed. Signed-off-by: David Kershner Signed-off-by: Timothy Sell --- drivers/staging/unisys/visorbus/visorbus_main.c | 24 ++-- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/drivers/staging/unisys/visorbus/visorbus_main.c b/drivers/staging/unisys/visorbus/visorbus_main.c index 816a16d..b31c44f8 100644 --- a/drivers/staging/unisys/visorbus/visorbus_main.c +++ b/drivers/staging/unisys/visorbus/visorbus_main.c @@ -182,7 +182,6 @@ static int visorbus_match(struct device *xdev, struct device_driver *xdrv) { uuid_le channel_type; - int rc = 0; int i; struct visor_device *dev; struct visor_driver *drv; @@ -190,26 +189,23 @@ visorbus_match(struct device *xdev, struct device_driver *xdrv) dev = to_visor_device(xdev); drv = to_visor_driver(xdrv); channel_type = visorchannel_get_uuid(dev->visorchannel); - if (visorbus_forcematch) { - rc = 1; - goto away; - } - if (visorbus_forcenomatch) - goto away; + if (visorbus_forcematch) + return 1; + if (visorbus_forcenomatch) + return 0; if (!drv->channel_types) - goto away; + return 0; + for (i = 0; (uuid_le_cmp(drv->channel_types[i].guid, NULL_UUID_LE) != 0) || (drv->channel_types[i].name); i++) if (uuid_le_cmp(drv->channel_types[i].guid, - channel_type) == 0) { - rc = i + 1; - goto away; - } -away: - return rc; + channel_type) == 0) + return i + 1; + + return 0; } /** This is called when device_unregister() is called for the bus device -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v3 5/5] staging: unisys: visorbus: rename create_visor_device gotos
Away is ambiguous when specifying error vs success. Make return labels more meaningful by marking them as error paths. Signed-off-by: David Kershner Signed-off-by: Timothy Sell --- drivers/staging/unisys/visorbus/visorbus_main.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/staging/unisys/visorbus/visorbus_main.c b/drivers/staging/unisys/visorbus/visorbus_main.c index b31c44f8..54d77dd 100644 --- a/drivers/staging/unisys/visorbus/visorbus_main.c +++ b/drivers/staging/unisys/visorbus/visorbus_main.c @@ -775,7 +775,7 @@ EXPORT_SYMBOL_GPL(visorbus_disable_channel_interrupts); static int create_visor_device(struct visor_device *dev) { - int rc; + int err; u32 chipset_bus_no = dev->chipset_bus_no; u32 chipset_dev_no = dev->chipset_dev_no; @@ -797,8 +797,8 @@ create_visor_device(struct visor_device *dev) if (!dev->periodic_work) { POSTCODE_LINUX_3(DEVICE_CREATE_FAILURE_PC, chipset_dev_no, DIAG_SEVERITY_ERR); - rc = -EINVAL; - goto away; + err = -EINVAL; + goto err_put; } /* bus_id must be a unique name with respect to this bus TYPE @@ -824,19 +824,19 @@ create_visor_device(struct visor_device *dev) * claim the device. The device will be linked onto * bus_type.klist_devices regardless (use bus_for_each_dev). */ - rc = device_add(&dev->device); - if (rc < 0) { + err = device_add(&dev->device); + if (err < 0) { POSTCODE_LINUX_3(DEVICE_ADD_PC, chipset_bus_no, DIAG_SEVERITY_ERR); - goto away; + goto err_put; } list_add_tail(&dev->list_all, &list_all_device_instances); - return 0; + return 0; /* success: reference kept via unmatched get_device() */ -away: +err_put: put_device(&dev->device); - return rc; + return err; } static void -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v3 3/5] staging: unisys: visorbus: fix up gotos in visorbus_init
This patch fixes the gotos in visorbus_init Signed-off-by: David Kershner Signed-off-by: Timothy Sell --- drivers/staging/unisys/visorbus/visorbus_main.c | 24 +++- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/drivers/staging/unisys/visorbus/visorbus_main.c b/drivers/staging/unisys/visorbus/visorbus_main.c index 813d29e..816a16d 100644 --- a/drivers/staging/unisys/visorbus/visorbus_main.c +++ b/drivers/staging/unisys/visorbus/visorbus_main.c @@ -1275,24 +1275,24 @@ struct channel_size_info { int visorbus_init(void) { - int rc = 0; + int err; - POSTCODE_LINUX_3(DRIVER_ENTRY_PC, rc, POSTCODE_SEVERITY_INFO); + POSTCODE_LINUX_3(DRIVER_ENTRY_PC, 0, POSTCODE_SEVERITY_INFO); bus_device_info_init(&clientbus_driverinfo, "clientbus", "visorbus", VERSION, NULL); - rc = create_bus_type(); - if (rc < 0) { + err = create_bus_type(); + if (err < 0) { POSTCODE_LINUX_2(BUS_CREATE_ENTRY_PC, DIAG_SEVERITY_ERR); - goto away; + goto error; } periodic_dev_workqueue = create_singlethread_workqueue("visorbus_dev"); if (!periodic_dev_workqueue) { POSTCODE_LINUX_2(CREATE_WORKQUEUE_PC, DIAG_SEVERITY_ERR); - rc = -ENOMEM; - goto away; + err = -ENOMEM; + goto error; } /* This enables us to receive notifications when devices appear for @@ -1302,13 +1302,11 @@ visorbus_init(void) &chipset_responders, &chipset_driverinfo); - rc = 0; + return 0; -away: - if (rc) - POSTCODE_LINUX_3(CHIPSET_INIT_FAILURE_PC, rc, -POSTCODE_SEVERITY_ERR); - return rc; +error: + POSTCODE_LINUX_3(CHIPSET_INIT_FAILURE_PC, err, POSTCODE_SEVERITY_ERR); + return err; } void -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v3 1/5] staging: unisys: visorbus: Fix up visordriver_probe
Fixup the visordriver_probe function. Rearrange the function to avoid needing gotos and removed unnecessary wmb(). Signed-off-by: David Kershner --- drivers/staging/unisys/visorbus/visorbus_main.c | 32 ++--- 1 file changed, 12 insertions(+), 20 deletions(-) diff --git a/drivers/staging/unisys/visorbus/visorbus_main.c b/drivers/staging/unisys/visorbus/visorbus_main.c index 533bb5b..6a12829 100644 --- a/drivers/staging/unisys/visorbus/visorbus_main.c +++ b/drivers/staging/unisys/visorbus/visorbus_main.c @@ -752,36 +752,28 @@ dev_stop_periodic_work(struct visor_device *dev) static int visordriver_probe_device(struct device *xdev) { - int rc; + int res; struct visor_driver *drv; struct visor_device *dev; drv = to_visor_driver(xdev->driver); dev = to_visor_device(xdev); + + if (!drv->probe) + return -ENODEV; + down(&dev->visordriver_callback_lock); dev->being_removed = false; - /* -* ensure that the dev->being_removed flag is cleared before -* we start the probe -*/ - wmb(); - get_device(&dev->device); - if (!drv->probe) { - up(&dev->visordriver_callback_lock); - rc = -ENODEV; - goto away; + + res = drv->probe(dev); + if (res >= 0) { + /* success: reference kept via unmatched get_device() */ + get_device(&dev->device); + fix_vbus_dev_info(dev); } - rc = drv->probe(dev); - if (rc < 0) - goto away; - fix_vbus_dev_info(dev); up(&dev->visordriver_callback_lock); - rc = 0; -away: - if (rc != 0) - put_device(&dev->device); - return rc; + return res; } /** This is called when device_unregister() is called for each child device -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] media: add GFP flag to media_*() that could get called in atomic context
Add GFP flags to media_create_pad_link(), media_create_intf_link(), media_devnode_create(), and media_add_link() that could get called in atomic context to allow callers to pass in the right flags for memory allocation. tree-wide driver changes for media_*() GFP flags change: Change drivers to add gfpflags to interffaces, media_create_pad_link(), media_create_intf_link() and media_devnode_create(). Signed-off-by: Shuah Khan Suggested-by: Mauro Carvalho Chehab --- Ran through kbuild-all compile testing. Tested the changes in Win-TV HVR-950Q device drivers/media/dvb-core/dvbdev.c| 26 +++- drivers/media/i2c/s5c73m3/s5c73m3-core.c | 6 ++- drivers/media/i2c/s5k5baf.c| 3 +- drivers/media/i2c/smiapp/smiapp-core.c | 3 +- drivers/media/i2c/tvp5150.c| 3 +- drivers/media/media-entity.c | 30 -- drivers/media/platform/exynos4-is/media-dev.c | 19 + drivers/media/platform/omap3isp/isp.c | 47 ++ drivers/media/platform/s3c-camif/camif-core.c | 4 +- drivers/media/platform/vsp1/vsp1_drm.c | 6 +-- drivers/media/platform/vsp1/vsp1_drv.c | 9 +++-- drivers/media/platform/xilinx/xilinx-vipp.c| 4 +- drivers/media/usb/au0828/au0828-core.c | 3 +- drivers/media/usb/uvc/uvc_entity.c | 2 +- drivers/media/v4l2-core/v4l2-dev.c | 5 ++- drivers/media/v4l2-core/v4l2-device.c | 3 +- drivers/media/v4l2-core/v4l2-mc.c | 25 +++- drivers/staging/media/davinci_vpfe/dm365_ipipeif.c | 3 +- drivers/staging/media/davinci_vpfe/dm365_isif.c| 2 +- drivers/staging/media/davinci_vpfe/dm365_resizer.c | 10 +++-- .../staging/media/davinci_vpfe/vpfe_mc_capture.c | 10 ++--- drivers/staging/media/omap4iss/iss.c | 17 +--- drivers/staging/media/omap4iss/iss_csi2.c | 6 ++- drivers/staging/media/omap4iss/iss_ipipeif.c | 3 +- drivers/staging/media/omap4iss/iss_resizer.c | 3 +- include/media/media-entity.h | 9 +++-- sound/usb/media.c | 15 --- 27 files changed, 170 insertions(+), 106 deletions(-) diff --git a/drivers/media/dvb-core/dvbdev.c b/drivers/media/dvb-core/dvbdev.c index e1684c5..57f3e1e 100644 --- a/drivers/media/dvb-core/dvbdev.c +++ b/drivers/media/dvb-core/dvbdev.c @@ -399,7 +399,8 @@ static int dvb_register_media_device(struct dvb_device *dvbdev, dvbdev->intf_devnode = media_devnode_create(dvbdev->adapter->mdev, intf_type, 0, - DVB_MAJOR, minor); + DVB_MAJOR, minor, + GFP_KERNEL); if (!dvbdev->intf_devnode) return -ENOMEM; @@ -416,7 +417,7 @@ static int dvb_register_media_device(struct dvb_device *dvbdev, return 0; link = media_create_intf_link(dvbdev->entity, &dvbdev->intf_devnode->intf, - MEDIA_LNK_FL_ENABLED); + MEDIA_LNK_FL_ENABLED, GFP_KERNEL); if (!link) return -ENOMEM; #endif @@ -558,7 +559,8 @@ static int dvb_create_io_intf_links(struct dvb_adapter *adap, if (strncmp(entity->name, name, strlen(name))) continue; link = media_create_intf_link(entity, intf, - MEDIA_LNK_FL_ENABLED); + MEDIA_LNK_FL_ENABLED, + GFP_KERNEL); if (!link) return -ENOMEM; } @@ -680,7 +682,8 @@ int dvb_create_media_graph(struct dvb_adapter *adap, } if (demux && ca) { ret = media_create_pad_link(demux, 1, ca, - 0, MEDIA_LNK_FL_ENABLED); + 0, MEDIA_LNK_FL_ENABLED, + GFP_KERNEL); if (ret) return -ENOMEM; } @@ -693,7 +696,8 @@ int dvb_create_media_graph(struct dvb_adapter *adap, strlen(DVR_TSOUT))) { ret = media_create_pad_link(demux, ++dvr_pad, - entity, 0, 0); + entity, 0, 0, + GFP_KERNEL); if (ret)
[PATCH] staging: dgap: dgap.c: fixed whitespace error caused by my patch
Signed-off-by: Gavin O'Leary --- drivers/staging/dgap/dgap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/dgap/dgap.c b/drivers/staging/dgap/dgap.c index 9e07a39..7845516 100644 --- a/drivers/staging/dgap/dgap.c +++ b/drivers/staging/dgap/dgap.c @@ -4819,7 +4819,7 @@ static int dgap_tty_ioctl(struct tty_struct *tty, unsigned int cmd, case TCSBRKP: /* support for POSIX tcsendbreak() -* +* * According to POSIX.1 spec (7.2.2.1.2) breaks should be * between 0.25 and 0.5 seconds so we'll ask for something * in the middle: 0.375 seconds. -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: dgap: dgap.c: Fixed a comment warning
Signed-off-by: Gavin O'Leary --- drivers/staging/dgap/dgap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/dgap/dgap.c b/drivers/staging/dgap/dgap.c index bad3551..9e07a39 100644 --- a/drivers/staging/dgap/dgap.c +++ b/drivers/staging/dgap/dgap.c @@ -4819,7 +4819,7 @@ static int dgap_tty_ioctl(struct tty_struct *tty, unsigned int cmd, case TCSBRKP: /* support for POSIX tcsendbreak() - +* * According to POSIX.1 spec (7.2.2.1.2) breaks should be * between 0.25 and 0.5 seconds so we'll ask for something * in the middle: 0.375 seconds. -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 1/6] staging: lustre: Correct missing newline for CERROR call in sfw_handle_server_rpc
On Sat, 2016-03-12 at 19:17 +, Drokin, Oleg wrote: > On Mar 12, 2016, at 1:56 PM, Joe Perches wrote: > > On Sat, 2016-03-12 at 18:32 +, Drokin, Oleg wrote: > > > On Mar 12, 2016, at 1:23 PM, Joe Perches wrote: > > > > On Sat, 2016-03-12 at 13:00 -0500, James Simmons wrote: > > > > > From: James Nunez > > > > > > > > > > This is one of the fixes broken out of patch 1 that was > > > > > missed in the merger. With this fix the CERROR called in > > > > > sfw_handle_server_rpc will print out correctly. > > > > Speaking of CERROR and logging, it it really useful > > > > for each CERROR use to have 2 static structs? > > > > > > > > In CERROR -> CDEBUG_LIMIT there is a: > > > > static struct cfs_debug_limit_state cdls; > > > > (12 or 16 bytes depending on 32/64 bit arch) > > > > > > > > and in CDEBUG_LIMIT -> _CDEBUG > > > > static struct libcfs_debug_msg_data msgdata; > > > > (24 or 36 bytes depending on 32/64 bit arch) > > > > > > > > That seems a largish bit of data and code to initialize > > > > these structs for over a thousand call sites. > > > > > > > > Wouldn't a single static suffice? > > > Single static would not work because the code is parallel so it'll > > > stomp over each other. > > Sure, but would that matter in practice? > Well. The bits about the callsite would certainly matter since > we need to know where the message is coming from. > Overwriting them in a racy way would make the messages unreliable. > > net_ratelimit() has similar parallelization and it doesn't > > seem to matter there. > That one seems to rate limit all prints together. > We are trying limit each individual one. > So if you have a bunch of print1 and a bunch of print2, but a few > of print3, you see the print3, but ratelimit the first two > and get something like this in the logs: > > print1 > print2 > print3 > print2 condensed: the message was repeated a gazillion times > print3 > print1 condensed: the message was repeated two gazillion times. Sure. It's up to you to control your output and I don't know if it matters or not. You do. > > > or do you mean to have a common > > > structure for every callsite (but instantiated separately)? > > That might help a tiny bit. > > > > Some possibly unnecessary bits: > > > > o .msg_cdls > How are we going to rate-limit this stuff without remembering some > information between the calls? Doesn't msg_cdls just point to the other structure? Combining the 2 into one might be useful. > > o __FILE__, __func__ and __LINE__ fields have marginal value > Probably not as important in the kernel indeed, but on the > other hand if the message has moved compared to the source developer has > then there is evidence some patches were applied and that could be asked > about. > > o .msg_subsys seems set only to DEBUG_SUBSYSTEM. > This is redefined in every source file: Thanks. I didn't look hard. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/1] scsi: storvsc: Support manual scan of FC hosts on Hyper-V
The default user scan function associated with FC (fc_user_scan) is not suitable for FC hosts on Hyper-V since we don't have an rport associated with FC host on Hyper-V . Set it to NULL so we can support manual scan of FC targets on Hyper-V. Signed-off-by: K. Y. Srinivasan Tested-by: Long Li Reviewed-by: Long Li --- drivers/scsi/storvsc_drv.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c index 132b168..8aec590 100644 --- a/drivers/scsi/storvsc_drv.c +++ b/drivers/scsi/storvsc_drv.c @@ -1776,6 +1776,12 @@ static int __init storvsc_drv_init(void) * Install Hyper-V specific timeout handler. */ fc_transport_template->eh_timed_out = storvsc_eh_timed_out; + /* +* The default user scan function associated with FC (fc_user_scan) +* is not suitable for FC hosts on Hyper-V. Set it to NULL so we can +* support manual scan of FC targets on Hyper-V. +*/ + fc_transport_template->user_scan = NULL; #endif ret = vmbus_driver_register(&storvsc_drv); -- 1.7.4.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCHv2] staging: rtl8723au: Fix line longer than 80 columns.
This patch fixes the checkpatch.pl warning: WARNING: line over 80 characters Signed-off-by: Edward Lipinsky --- Change in v2: - Break the line after the format string, as suggested by Joe Perches . drivers/staging/rtl8723au/core/rtw_ap.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/rtl8723au/core/rtw_ap.c b/drivers/staging/rtl8723au/core/rtw_ap.c index ce4b589..67c9d90 100644 --- a/drivers/staging/rtl8723au/core/rtw_ap.c +++ b/drivers/staging/rtl8723au/core/rtw_ap.c @@ -1834,7 +1834,8 @@ void stop_ap_mode23a(struct rtw_adapter *padapter) } spin_unlock_bh(&pacl_node_q->lock); - DBG_8723A("%s, free acl_node_queue, num =%d\n", __func__, pacl_list->num); + DBG_8723A("%s, free acl_node_queue, num =%d\n", + __func__, pacl_list->num); rtw_sta_flush23a(padapter); -- 1.7.9.5 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 1/6] staging: lustre: Correct missing newline for CERROR call in sfw_handle_server_rpc
On Sat, 2016-03-12 at 18:32 +, Drokin, Oleg wrote: > On Mar 12, 2016, at 1:23 PM, Joe Perches wrote: > > On Sat, 2016-03-12 at 13:00 -0500, James Simmons wrote: > > > From: James Nunez > > > > > > This is one of the fixes broken out of patch 1 that was > > > missed in the merger. With this fix the CERROR called in > > > sfw_handle_server_rpc will print out correctly. > > Speaking of CERROR and logging, it it really useful > > for each CERROR use to have 2 static structs? > > > > In CERROR -> CDEBUG_LIMIT there is a: > > static struct cfs_debug_limit_state cdls; > > (12 or 16 bytes depending on 32/64 bit arch) > > > > and in CDEBUG_LIMIT -> _CDEBUG > > static struct libcfs_debug_msg_data msgdata; > > (24 or 36 bytes depending on 32/64 bit arch) > > > > That seems a largish bit of data and code to initialize > > these structs for over a thousand call sites. > > > > Wouldn't a single static suffice? > Single static would not work because the code is parallel so it'll > stomp over each other. Sure, but would that matter in practice? net_ratelimit() has similar parallelization and it doesn't seem to matter there. > or do you mean to have a common > structure for every callsite (but instantiated separately)? That might help a tiny bit. Some possibly unnecessary bits: o .msg_cdls o __FILE__, __func__ and __LINE__ fields have marginal value o .msg_subsys seems set only to DEBUG_SUBSYSTEM. > This used to be a local structure in the past, but that > caused considerable stack growth for some functions, that added > up along the call chain, and that was the solution we came up with > that did help. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 1/6] staging: lustre: Correct missing newline for CERROR call in sfw_handle_server_rpc
On Mar 12, 2016, at 1:56 PM, Joe Perches wrote: > On Sat, 2016-03-12 at 18:32 +, Drokin, Oleg wrote: >> On Mar 12, 2016, at 1:23 PM, Joe Perches wrote: >>> On Sat, 2016-03-12 at 13:00 -0500, James Simmons wrote: From: James Nunez This is one of the fixes broken out of patch 1 that was missed in the merger. With this fix the CERROR called in sfw_handle_server_rpc will print out correctly. >>> Speaking of CERROR and logging, it it really useful >>> for each CERROR use to have 2 static structs? >>> >>> In CERROR -> CDEBUG_LIMIT there is a: >>> static struct cfs_debug_limit_state cdls; >>> (12 or 16 bytes depending on 32/64 bit arch) >>> >>> and in CDEBUG_LIMIT -> _CDEBUG >>> static struct libcfs_debug_msg_data msgdata; >>> (24 or 36 bytes depending on 32/64 bit arch) >>> >>> That seems a largish bit of data and code to initialize >>> these structs for over a thousand call sites. >>> >>> Wouldn't a single static suffice? >> Single static would not work because the code is parallel so it'll >> stomp over each other. > > Sure, but would that matter in practice? Well. The bits about the callsite would certainly matter since we need to know where the message is coming from. Overwriting them in a racy way would make the messages unreliable. > net_ratelimit() has similar parallelization and it doesn't > seem to matter there. That one seems to rate limit all prints together. We are trying limit each individual one. So if you have a bunch of print1 and a bunch of print2, but a few of print3, you see the print3, but ratelimit the first two and get something like this in the logs: print1 print2 print3 print2 condensed: the message was repeated a gazillion times print3 print1 condensed: the message was repeated two gazillion times. > >> or do you mean to have a common >> structure for every callsite (but instantiated separately)? > > That might help a tiny bit. > > Some possibly unnecessary bits: > > o .msg_cdls How are we going to rate-limit this stuff without remembering some information between the calls? > o __FILE__, __func__ and __LINE__ fields have marginal value Probably not as important in the kernel indeed, but on the other hand if the message has moved compared to the source developer has then there is evidence some patches were applied and that could be asked about. > o .msg_subsys seems set only to DEBUG_SUBSYSTEM. This is redefined in every source file: drivers/staging/lustre/lustre/fid/fid_lib.c:#define DEBUG_SUBSYSTEM S_FID drivers/staging/lustre/lustre/fid/fid_request.c:#define DEBUG_SUBSYSTEM S_FID drivers/staging/lustre/lustre/fid/lproc_fid.c:#define DEBUG_SUBSYSTEM S_FID drivers/staging/lustre/lustre/fld/fld_cache.c:#define DEBUG_SUBSYSTEM S_FLD drivers/staging/lustre/lustre/fld/fld_request.c:#define DEBUG_SUBSYSTEM S_FLD drivers/staging/lustre/lustre/fld/lproc_fld.c:#define DEBUG_SUBSYSTEM S_FLD … Allows you to filter out messages by subsystem in addition to by level. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 1/6] staging: lustre: Correct missing newline for CERROR call in sfw_handle_server_rpc
On Sat, 2016-03-12 at 13:00 -0500, James Simmons wrote: > From: James Nunez > > This is one of the fixes broken out of patch 1 that was > missed in the merger. With this fix the CERROR called in > sfw_handle_server_rpc will print out correctly. Speaking of CERROR and logging, it it really useful for each CERROR use to have 2 static structs? In CERROR -> CDEBUG_LIMIT there is a: static struct cfs_debug_limit_state cdls; (12 or 16 bytes depending on 32/64 bit arch) and in CDEBUG_LIMIT -> _CDEBUG static struct libcfs_debug_msg_data msgdata; (24 or 36 bytes depending on 32/64 bit arch) That seems a largish bit of data and code to initialize these structs for over a thousand call sites. Wouldn't a single static suffice? ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 1/6] staging: lustre: Correct missing newline for CERROR call in sfw_handle_server_rpc
On Mar 12, 2016, at 1:23 PM, Joe Perches wrote: > On Sat, 2016-03-12 at 13:00 -0500, James Simmons wrote: >> From: James Nunez >> >> This is one of the fixes broken out of patch 1 that was >> missed in the merger. With this fix the CERROR called in >> sfw_handle_server_rpc will print out correctly. > > Speaking of CERROR and logging, it it really useful > for each CERROR use to have 2 static structs? > > In CERROR -> CDEBUG_LIMIT there is a: > static struct cfs_debug_limit_state cdls; > (12 or 16 bytes depending on 32/64 bit arch) > > and in CDEBUG_LIMIT -> _CDEBUG > static struct libcfs_debug_msg_data msgdata; > (24 or 36 bytes depending on 32/64 bit arch) > > That seems a largish bit of data and code to initialize > these structs for over a thousand call sites. > > Wouldn't a single static suffice? Single static would not work because the code is parallel so it'll stomp over each other. or do you mean to have a common structure for every callsite (but instantiated separately)? This used to be a local structure in the past, but that caused considerable stack growth for some functions, that added up along the call chain, and that was the solution we came up with that did help. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 2/6] staging: lustre: add missing buffer overflow fix for console.c
From: Dmitry Eremin Patch 9389 change a strncpy call into a strlcpy call. This was missed in the merger into the upstream client. Signed-off-by: Dmitry Eremin Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4629 Reviewed-on: http://review.whamcloud.com/9389 Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin --- drivers/staging/lustre/lnet/selftest/console.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/staging/lustre/lnet/selftest/console.c b/drivers/staging/lustre/lnet/selftest/console.c index 1a923ea..c009ad3 100644 --- a/drivers/staging/lustre/lnet/selftest/console.c +++ b/drivers/staging/lustre/lnet/selftest/console.c @@ -1749,7 +1749,7 @@ lstcon_session_new(char *name, int key, unsigned feats, if (strlen(name) > sizeof(console_session.ses_name) - 1) return -E2BIG; - strncpy(console_session.ses_name, name, + strlcpy(console_session.ses_name, name, sizeof(console_session.ses_name)); rc = lstcon_batch_add(LST_DEFAULT_BATCH); -- 1.7.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 6/6] staging: lustre: cleanup comment style for lnet selftest
Apply a consistent style for comments in the lnet selftest code. Realign some of the comments to make it easier to read. This also fixes a few checkpatch issues as well. Signed-off-by: James Simmons --- drivers/staging/lustre/lnet/selftest/brw_test.c |2 +- drivers/staging/lustre/lnet/selftest/conctl.c| 50 +++--- drivers/staging/lustre/lnet/selftest/conrpc.c| 17 drivers/staging/lustre/lnet/selftest/console.c |5 +- drivers/staging/lustre/lnet/selftest/framework.c | 12 +++--- drivers/staging/lustre/lnet/selftest/ping_test.c |2 +- drivers/staging/lustre/lnet/selftest/rpc.c |8 ++-- drivers/staging/lustre/lnet/selftest/timer.c |2 +- 8 files changed, 50 insertions(+), 48 deletions(-) diff --git a/drivers/staging/lustre/lnet/selftest/brw_test.c b/drivers/staging/lustre/lnet/selftest/brw_test.c index 69812fc..b33c356 100644 --- a/drivers/staging/lustre/lnet/selftest/brw_test.c +++ b/drivers/staging/lustre/lnet/selftest/brw_test.c @@ -327,7 +327,7 @@ brw_client_done_rpc(sfw_test_unit_t *tsu, srpc_client_rpc_t *rpc) if (rpc->crpc_status) { CERROR("BRW RPC to %s failed with %d\n", libcfs_id2str(rpc->crpc_dest), rpc->crpc_status); - if (!tsi->tsi_stopping) /* rpc could have been aborted */ + if (!tsi->tsi_stopping) /* rpc could have been aborted */ atomic_inc(&sn->sn_brw_errors); return; } diff --git a/drivers/staging/lustre/lnet/selftest/conctl.c b/drivers/staging/lustre/lnet/selftest/conctl.c index 5c7cb72..6e2a81d 100644 --- a/drivers/staging/lustre/lnet/selftest/conctl.c +++ b/drivers/staging/lustre/lnet/selftest/conctl.c @@ -51,9 +51,9 @@ lst_session_new_ioctl(lstio_session_new_args_t *args) char *name; int rc; - if (!args->lstio_ses_idp || /* address for output sid */ - !args->lstio_ses_key ||/* no key is specified */ - !args->lstio_ses_namep || /* session name */ + if (!args->lstio_ses_idp || /* address for output sid */ + !args->lstio_ses_key || /* no key is specified */ + !args->lstio_ses_namep || /* session name */ args->lstio_ses_nmlen <= 0 || args->lstio_ses_nmlen > LST_NAME_SIZE) return -EINVAL; @@ -95,11 +95,11 @@ lst_session_info_ioctl(lstio_session_info_args_t *args) { /* no checking of key */ - if (!args->lstio_ses_idp || /* address for output sid */ - !args->lstio_ses_keyp || /* address for output key */ - !args->lstio_ses_featp || /* address for output features */ - !args->lstio_ses_ndinfo || /* address for output ndinfo */ - !args->lstio_ses_namep || /* address for output name */ + if (!args->lstio_ses_idp || /* address for output sid */ + !args->lstio_ses_keyp ||/* address for output key */ + !args->lstio_ses_featp || /* address for output features */ + !args->lstio_ses_ndinfo || /* address for output ndinfo */ + !args->lstio_ses_namep || /* address for output name */ args->lstio_ses_nmlen <= 0 || args->lstio_ses_nmlen > LST_NAME_SIZE) return -EINVAL; @@ -125,7 +125,7 @@ lst_debug_ioctl(lstio_debug_args_t *args) if (!args->lstio_dbg_resultp) return -EINVAL; - if (args->lstio_dbg_namep && /* name of batch/group */ + if (args->lstio_dbg_namep &&/* name of batch/group */ (args->lstio_dbg_nmlen <= 0 || args->lstio_dbg_nmlen > LST_NAME_SIZE)) return -EINVAL; @@ -326,7 +326,7 @@ lst_nodes_add_ioctl(lstio_group_nodes_args_t *args) if (args->lstio_grp_key != console_session.ses_key) return -EACCES; - if (!args->lstio_grp_idsp || /* array of ids */ + if (!args->lstio_grp_idsp ||/* array of ids */ args->lstio_grp_count <= 0 || !args->lstio_grp_resultp || !args->lstio_grp_featp || @@ -394,13 +394,13 @@ lst_group_info_ioctl(lstio_group_info_args_t *args) args->lstio_grp_nmlen > LST_NAME_SIZE) return -EINVAL; - if (!args->lstio_grp_entp && /* output: group entry */ - !args->lstio_grp_dentsp) /* output: node entry */ + if (!args->lstio_grp_entp &&/* output: group entry */ + !args->lstio_grp_dentsp)/* output: node entry */ return -EINVAL; - if (args->lstio_grp_dentsp) { /* have node entry */ - if (!args->lstio_grp_idxp || /* node index */ - !args->lstio_grp_ndentp) /* # of node entry */ + if (args->lstio_grp_dentsp) { /* have node entry */ + if (!args->lstio_grp_idxp ||/* node index */ + !args->lstio_grp_ndentp)/* # of node entry */ return -EINVAL; if (
[PATCH 5/6] staging: lustre: realign some code in lnet selftest so its readable
Two places to align the code so it is easier to read. Signed-off-by: James Simmons --- drivers/staging/lustre/lnet/selftest/console.c |2 +- drivers/staging/lustre/lnet/selftest/ping_test.c |4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/lustre/lnet/selftest/console.c b/drivers/staging/lustre/lnet/selftest/console.c index 17d0d13..6ec8952 100644 --- a/drivers/staging/lustre/lnet/selftest/console.c +++ b/drivers/staging/lustre/lnet/selftest/console.c @@ -733,7 +733,7 @@ lstcon_group_list(int index, int len, char __user *name_up) list_for_each_entry(grp, &console_session.ses_grp_list, grp_link) { if (!index--) { return copy_to_user(name_up, grp->grp_name, len) ? - -EFAULT : 0; + -EFAULT : 0; } } diff --git a/drivers/staging/lustre/lnet/selftest/ping_test.c b/drivers/staging/lustre/lnet/selftest/ping_test.c index 81a4504..438fca2 100644 --- a/drivers/staging/lustre/lnet/selftest/ping_test.c +++ b/drivers/staging/lustre/lnet/selftest/ping_test.c @@ -86,8 +86,8 @@ ping_client_fini(sfw_test_instance_t *tsi) } static int -ping_client_prep_rpc(sfw_test_unit_t *tsu, -lnet_process_id_t dest, srpc_client_rpc_t **rpc) +ping_client_prep_rpc(sfw_test_unit_t *tsu, lnet_process_id_t dest, +srpc_client_rpc_t **rpc) { srpc_ping_reqst_t *req; sfw_test_instance_t *tsi = tsu->tsu_instance; -- 1.7.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 4/6] staging: lustre: remove excess blank lines in lnet selftest code
Remove extra blank lines missed by checkpatch. Signed-off-by: James Simmons --- drivers/staging/lustre/lnet/selftest/brw_test.c |2 -- drivers/staging/lustre/lnet/selftest/conrpc.c |2 -- drivers/staging/lustre/lnet/selftest/console.c |2 -- 3 files changed, 0 insertions(+), 6 deletions(-) diff --git a/drivers/staging/lustre/lnet/selftest/brw_test.c b/drivers/staging/lustre/lnet/selftest/brw_test.c index eebc924..69812fc 100644 --- a/drivers/staging/lustre/lnet/selftest/brw_test.c +++ b/drivers/staging/lustre/lnet/selftest/brw_test.c @@ -91,7 +91,6 @@ brw_client_init(sfw_test_instance_t *tsi) * but we have to keep it for compatibility */ len = npg * PAGE_CACHE_SIZE; - } else { test_bulk_req_v1_t *breq = &tsi->tsi_u.bulk_v1; @@ -279,7 +278,6 @@ brw_client_prep_rpc(sfw_test_unit_t *tsu, flags = breq->blk_flags; npg = breq->blk_npg; len = npg * PAGE_CACHE_SIZE; - } else { test_bulk_req_v1_t *breq = &tsi->tsi_u.bulk_v1; diff --git a/drivers/staging/lustre/lnet/selftest/conrpc.c b/drivers/staging/lustre/lnet/selftest/conrpc.c index bcd7888..d11869a 100644 --- a/drivers/staging/lustre/lnet/selftest/conrpc.c +++ b/drivers/staging/lustre/lnet/selftest/conrpc.c @@ -531,7 +531,6 @@ lstcon_rpc_trans_interpreter(lstcon_rpc_trans_t *trans, continue; error = readent(trans->tas_opc, msg, ent); - if (error) return error; } @@ -841,7 +840,6 @@ lstcon_testrpc_prep(lstcon_node_t *nd, int transop, unsigned feats, trq->tsr_ndest = 0; trq->tsr_loop = nmax * test->tes_dist * test->tes_concur; - } else { bulk = &(*crpc)->crp_rpc->crpc_bulk; diff --git a/drivers/staging/lustre/lnet/selftest/console.c b/drivers/staging/lustre/lnet/selftest/console.c index c009ad3..17d0d13 100644 --- a/drivers/staging/lustre/lnet/selftest/console.c +++ b/drivers/staging/lustre/lnet/selftest/console.c @@ -977,7 +977,6 @@ lstcon_batch_info(char *name, lstcon_test_batch_ent_t __user *ent_up, if (!test) { entp->u.tbe_batch.bae_ntest = bat->bat_ntest; entp->u.tbe_batch.bae_state = bat->bat_state; - } else { entp->u.tbe_test.tse_type = test->tes_type; entp->u.tbe_test.tse_loop = test->tes_loop; @@ -1423,7 +1422,6 @@ lstcon_test_batch_query(char *name, int testidx, int client, translist = &batch->bat_trans_list; ndlist = &batch->bat_cli_list; hdr = &batch->bat_hdr; - } else { /* query specified test only */ rc = lstcon_test_find(batch, testidx, &test); -- 1.7.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 0/6] Last batch of lnet selftest cleanup
Some fixes from two earlier patches got dropped so we add them to this batch. Last of the style cleanups for LNet selftest. Redid the comment style patch to format the comments correctly. Dmitry Eremin (1): staging: lustre: add missing buffer overflow fix for console.c James Nunez (1): staging: lustre: Correct missing newline for CERROR call in sfw_handle_server_rpc James Simmons (4): staging: lustre: handle error returned from wait_event_timeout seltest timer staging: lustre: remove excess blank lines in lnet selftest code staging: lustre: realign some code in lnet selftest so its readable staging: lustre: cleanup comment style for lnet selftest drivers/staging/lustre/lnet/selftest/brw_test.c |4 +- drivers/staging/lustre/lnet/selftest/conctl.c| 50 +++--- drivers/staging/lustre/lnet/selftest/conrpc.c| 19 drivers/staging/lustre/lnet/selftest/console.c | 11 ++--- drivers/staging/lustre/lnet/selftest/framework.c | 14 +++--- drivers/staging/lustre/lnet/selftest/ping_test.c |6 +- drivers/staging/lustre/lnet/selftest/rpc.c |8 ++-- drivers/staging/lustre/lnet/selftest/timer.c | 12 +++-- 8 files changed, 61 insertions(+), 63 deletions(-) ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/6] staging: lustre: Correct missing newline for CERROR call in sfw_handle_server_rpc
From: James Nunez This is one of the fixes broken out of patch 1 that was missed in the merger. With this fix the CERROR called in sfw_handle_server_rpc will print out correctly. Signed-off-by: James Nunez Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4871 Reviewed-on: http://review.whamcloud.com/1 Reviewed-by: Andreas Dilger Reviewed-by: John L. Hammond Reviewed-by: Cliff White --- drivers/staging/lustre/lnet/selftest/framework.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/staging/lustre/lnet/selftest/framework.c b/drivers/staging/lustre/lnet/selftest/framework.c index 926c397..0f32f0b 100644 --- a/drivers/staging/lustre/lnet/selftest/framework.c +++ b/drivers/staging/lustre/lnet/selftest/framework.c @@ -1244,7 +1244,7 @@ sfw_handle_server_rpc(struct srpc_server_rpc *rpc) /* Remove timer to avoid racing with it or expiring active session */ if (sfw_del_session_timer()) { - CERROR("Dropping RPC (%s) from %s: racing with expiry timer.", + CERROR("dropping RPC %s from %s: racing with expiry timer\n", sv->sv_name, libcfs_id2str(rpc->srpc_peer)); spin_unlock(&sfw_data.fw_lock); return -EAGAIN; -- 1.7.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 3/6] staging: lustre: handle error returned from wait_event_timeout seltest timer
The function wait_event_timeout can fail and return an error. Handle this case in stt_timer_main(). Signed-off-by: James Simmons --- drivers/staging/lustre/lnet/selftest/timer.c | 10 ++ 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/staging/lustre/lnet/selftest/timer.c b/drivers/staging/lustre/lnet/selftest/timer.c index 8be5252..ef8a8a7 100644 --- a/drivers/staging/lustre/lnet/selftest/timer.c +++ b/drivers/staging/lustre/lnet/selftest/timer.c @@ -170,20 +170,22 @@ stt_check_timers(unsigned long *last) static int stt_timer_main(void *arg) { + int rc = 0; + cfs_block_allsigs(); while (!stt_data.stt_shuttingdown) { stt_check_timers(&stt_data.stt_prev_slot); - wait_event_timeout(stt_data.stt_waitq, - stt_data.stt_shuttingdown, - cfs_time_seconds(STTIMER_SLOTTIME)); + rc = wait_event_timeout(stt_data.stt_waitq, + stt_data.stt_shuttingdown, + cfs_time_seconds(STTIMER_SLOTTIME)); } spin_lock(&stt_data.stt_lock); stt_data.stt_nthreads--; spin_unlock(&stt_data.stt_lock); - return 0; + return rc; } static int -- 1.7.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging/android: change IOCTLs opcode after ABI change
On Fri, Mar 11, 2016 at 5:00 PM, Greg Kroah-Hartman wrote: > On Thu, Mar 03, 2016 at 07:42:43PM -0300, Gustavo Padovan wrote: >> From: Gustavo Padovan >> >> Burn the old opcode to avoid any potential old userspace running the old >> API to get weird errors. Changing the opcodes will make them fail right >> away. >> >> This is just a precaution, there no upstream users of these interfaces >> yet and the only user is Android, but we don't expect anyone trying to >> run android userspace and all it dependencies on top of upstream kernels. >> >> Moreover Android should be converted to use upstream sync_files. >> >> Suggested-by: Rob Clark >> Signed-off-by: Gustavo Padovan >> --- >> drivers/staging/android/uapi/sync.h | 11 +-- >> 1 file changed, 9 insertions(+), 2 deletions(-) > > Where does this belong in this patch series? Before it? After it? In > the middle? Not sure if overkill, but if we wanted to be pedantic about bisectability put all the uabi struct changes plus ioctl # changes into a single patch (with the following patches starting to use the new fields)? Either way, I think the only two people in the world effected by this (ie. who are playing with AOSP on an upstream (plus a few patches) kernel) are Rob Herring and John Stultz. (Adding them to CC so they are aware). BR, -R > Please resend the whole series, gather up all of the reviewed and > signed-off-by markings from everyone involved, and I'll be glad to apply > them. > > thanks, > > greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[staging:staging-testing 1317/1582] warning: (LUSTRE_FS) selects LNET which has unmet direct dependencies (STAGING && ..)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git staging-testing head: 2df122bdebaba1daad3a8087b89a5e3456474538 commit: b08bb6bb5af5d1df8f41399f931efa1673fac1ac [1317/1582] staging: lustre: make lustre dependent on LNet config: x86_64-randconfig-b0-03122341 (attached as .config) reproduce: git checkout b08bb6bb5af5d1df8f41399f931efa1673fac1ac # save the attached .config to linux build tree make ARCH=x86_64 All error/warnings (new ones prefixed by >>): warning: (LUSTRE_FS) selects LNET which has unmet direct dependencies (STAGING && INET && m && MODULES) >> ERROR: "tcp_sendpage" >> [drivers/staging/lustre/lnet/klnds/socklnd/ksocklnd.ko] undefined! --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: Binary data ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] Staging: rtl8192e: Fix warning exceeding characters per line
This patch fixes the checkpatch.pl warning regarding the exceeding 80 characters on line 36. This patch add a newline after function statement on line 52 Signed-off-by: Adonis Settouf --- drivers/staging/rtl8192e/dot11d.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8192e/dot11d.h b/drivers/staging/rtl8192e/dot11d.h index 735a199..5cffc8f 100644 --- a/drivers/staging/rtl8192e/dot11d.h +++ b/drivers/staging/rtl8192e/dot11d.h @@ -30,8 +30,8 @@ enum dot11d_state { }; /** - * struct rt_dot11d_info * @CountryIeLen: value greater than 0 if @CountryIeBuf contains - * valid country information element. + * struct rt_dot11d_info * @CountryIeLen: value greater than 0 if + * @CountryIeBuf contains valid country information element. * @channel_map: holds channel values * 0 - invalid, * 1 - valid (active scan), @@ -78,6 +78,7 @@ static inline void RESET_CIE_WATCHDOG(struct rtllib_device *__pIeeeDev) { GET_CIE_WATCHDOG(__pIeeeDev) = 0; } + #define UPDATE_CIE_WATCHDOG(__pIeeeDev) (++GET_CIE_WATCHDOG(__pIeeeDev)) void dot11d_init(struct rtllib_device *dev); -- 2.1.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [RFC PATCH v2 2/2] staging: iio: ad7192: use iio_device_{claim|release}_direct_mode()
On 12/03/16 11:21, Jonathan Cameron wrote: > On 09/03/16 19:30, Alison Schofield wrote: >> Replace the code that guarantees the device stays in direct mode with >> iio_device_{claim|release}_direct_mode() which does same. >> >> Signed-off-by: Alison Schofield > A small improvement inline - don't eat the errors within the > driver. As it is trivial - I've fixed it up as suggested and applied. Seemed silly to go round again for such a small change. I'm hoping you have the opportunity to take this tree wide. Thanks, Jonathan > > Jonathan >> --- >> drivers/staging/iio/adc/ad7192.c | 24 +--- >> 1 file changed, 9 insertions(+), 15 deletions(-) >> >> diff --git a/drivers/staging/iio/adc/ad7192.c >> b/drivers/staging/iio/adc/ad7192.c >> index f843f19..94a2e06 100644 >> --- a/drivers/staging/iio/adc/ad7192.c >> +++ b/drivers/staging/iio/adc/ad7192.c >> @@ -349,11 +349,9 @@ static ssize_t ad7192_write_frequency(struct device >> *dev, >> if (lval == 0) >> return -EINVAL; >> >> -mutex_lock(&indio_dev->mlock); >> -if (iio_buffer_enabled(indio_dev)) { >> -mutex_unlock(&indio_dev->mlock); >> +ret = iio_device_claim_direct_mode(indio_dev); >> +if (ret) >> return -EBUSY; > return ret; In theory we might be returning some other > error code so best not to 'eat' the result. >> -} >> >> div = st->mclk / (lval * st->f_order * 1024); >> if (div < 1 || div > 1023) { >> @@ -366,7 +364,7 @@ static ssize_t ad7192_write_frequency(struct device *dev, >> ad_sd_write_reg(&st->sd, AD7192_REG_MODE, 3, st->mode); >> >> out: >> -mutex_unlock(&indio_dev->mlock); >> +iio_device_release_direct_mode(indio_dev); >> >> return ret ? ret : len; >> } >> @@ -434,11 +432,9 @@ static ssize_t ad7192_set(struct device *dev, >> if (ret < 0) >> return ret; >> >> -mutex_lock(&indio_dev->mlock); >> -if (iio_buffer_enabled(indio_dev)) { >> -mutex_unlock(&indio_dev->mlock); >> +ret = iio_device_claim_direct_mode(indio_dev); >> +if (ret) >> return -EBUSY; > Same here. >> -} >> >> switch ((u32)this_attr->address) { >> case AD7192_REG_GPOCON: >> @@ -461,7 +457,7 @@ static ssize_t ad7192_set(struct device *dev, >> ret = -EINVAL; >> } >> >> -mutex_unlock(&indio_dev->mlock); >> +iio_device_release_direct_mode(indio_dev); >> >> return ret ? ret : len; >> } >> @@ -555,11 +551,9 @@ static int ad7192_write_raw(struct iio_dev *indio_dev, >> int ret, i; >> unsigned int tmp; >> >> -mutex_lock(&indio_dev->mlock); >> -if (iio_buffer_enabled(indio_dev)) { >> -mutex_unlock(&indio_dev->mlock); >> +ret = iio_device_claim_direct_mode(indio_dev); >> +if (ret) >> return -EBUSY; > And here. >> -} >> >> switch (mask) { >> case IIO_CHAN_INFO_SCALE: >> @@ -582,7 +576,7 @@ static int ad7192_write_raw(struct iio_dev *indio_dev, >> ret = -EINVAL; >> } >> >> -mutex_unlock(&indio_dev->mlock); >> +iio_device_release_direct_mode(indio_dev); >> >> return ret; >> } >> > > -- > To unsubscribe from this list: send the line "unsubscribe linux-iio" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [RFC PATCH v2 2/2] staging: iio: ad7192: use iio_device_{claim|release}_direct_mode()
On 09/03/16 19:30, Alison Schofield wrote: > Replace the code that guarantees the device stays in direct mode with > iio_device_{claim|release}_direct_mode() which does same. > > Signed-off-by: Alison Schofield A small improvement inline - don't eat the errors within the driver. Jonathan > --- > drivers/staging/iio/adc/ad7192.c | 24 +--- > 1 file changed, 9 insertions(+), 15 deletions(-) > > diff --git a/drivers/staging/iio/adc/ad7192.c > b/drivers/staging/iio/adc/ad7192.c > index f843f19..94a2e06 100644 > --- a/drivers/staging/iio/adc/ad7192.c > +++ b/drivers/staging/iio/adc/ad7192.c > @@ -349,11 +349,9 @@ static ssize_t ad7192_write_frequency(struct device *dev, > if (lval == 0) > return -EINVAL; > > - mutex_lock(&indio_dev->mlock); > - if (iio_buffer_enabled(indio_dev)) { > - mutex_unlock(&indio_dev->mlock); > + ret = iio_device_claim_direct_mode(indio_dev); > + if (ret) > return -EBUSY; return ret; In theory we might be returning some other error code so best not to 'eat' the result. > - } > > div = st->mclk / (lval * st->f_order * 1024); > if (div < 1 || div > 1023) { > @@ -366,7 +364,7 @@ static ssize_t ad7192_write_frequency(struct device *dev, > ad_sd_write_reg(&st->sd, AD7192_REG_MODE, 3, st->mode); > > out: > - mutex_unlock(&indio_dev->mlock); > + iio_device_release_direct_mode(indio_dev); > > return ret ? ret : len; > } > @@ -434,11 +432,9 @@ static ssize_t ad7192_set(struct device *dev, > if (ret < 0) > return ret; > > - mutex_lock(&indio_dev->mlock); > - if (iio_buffer_enabled(indio_dev)) { > - mutex_unlock(&indio_dev->mlock); > + ret = iio_device_claim_direct_mode(indio_dev); > + if (ret) > return -EBUSY; Same here. > - } > > switch ((u32)this_attr->address) { > case AD7192_REG_GPOCON: > @@ -461,7 +457,7 @@ static ssize_t ad7192_set(struct device *dev, > ret = -EINVAL; > } > > - mutex_unlock(&indio_dev->mlock); > + iio_device_release_direct_mode(indio_dev); > > return ret ? ret : len; > } > @@ -555,11 +551,9 @@ static int ad7192_write_raw(struct iio_dev *indio_dev, > int ret, i; > unsigned int tmp; > > - mutex_lock(&indio_dev->mlock); > - if (iio_buffer_enabled(indio_dev)) { > - mutex_unlock(&indio_dev->mlock); > + ret = iio_device_claim_direct_mode(indio_dev); > + if (ret) > return -EBUSY; And here. > - } > > switch (mask) { > case IIO_CHAN_INFO_SCALE: > @@ -582,7 +576,7 @@ static int ad7192_write_raw(struct iio_dev *indio_dev, > ret = -EINVAL; > } > > - mutex_unlock(&indio_dev->mlock); > + iio_device_release_direct_mode(indio_dev); > > return ret; > } > ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [RFC PATCH v2 1/2] iio: core: implement iio_device_{claim|release}_direct_mode()
On 09/03/16 19:30, Alison Schofield wrote: > It is often the case that the driver wants to be sure a device stays > in direct mode while it is executing a task or series of tasks. To > accomplish this today, the driver performs this sequence: 1) take the > device state lock, 2) verify it is not in a buffered mode, 3) execute > some tasks, and 4) release that lock. > > This patch introduces a pair of helper functions that simplify these > steps and make it more semantically expressive. > > iio_device_claim_direct_mode() > If the device is not in any buffered mode it is guaranteed > to stay that way until iio_release_direct_mode() is called. > > iio_device_release_direct_mode() > Release the claim. Device is no longer guaranteed to stay > in direct mode. > > Signed-off-by: Alison Schofield I like change. Nice and clean and should help reduce 'misuse' of this lock by making it more focused in the long run. Applied to the togreg branch of iio.git - initially pushed out as testing for the autobuilders to play with it. > --- > drivers/iio/industrialio-core.c | 39 +++ > include/linux/iio/iio.h | 2 ++ > 2 files changed, 41 insertions(+) > > diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c > index 70cb7eb..2e768bc 100644 > --- a/drivers/iio/industrialio-core.c > +++ b/drivers/iio/industrialio-core.c > @@ -25,6 +25,7 @@ > #include > #include > #include > +#include > #include > #include "iio_core.h" > #include "iio_core_trigger.h" > @@ -1375,6 +1376,44 @@ void devm_iio_device_unregister(struct device *dev, > struct iio_dev *indio_dev) > } > EXPORT_SYMBOL_GPL(devm_iio_device_unregister); > > +/** > + * iio_device_claim_direct_mode - Keep device in direct mode > + * @indio_dev: the iio_dev associated with the device > + * > + * If the device is in direct mode it is guaranteed to stay > + * that way until iio_device_release_direct_mode() is called. > + * > + * Use with iio_device_release_direct_mode() > + * > + * Returns: 0 on success, -EBUSY on failure > + */ > +int iio_device_claim_direct_mode(struct iio_dev *indio_dev) > +{ > + mutex_lock(&indio_dev->mlock); > + > + if (iio_buffer_enabled(indio_dev)) { > + mutex_unlock(&indio_dev->mlock); > + return -EBUSY; > + } > + return 0; > +} > +EXPORT_SYMBOL_GPL(iio_device_claim_direct_mode); > + > +/** > + * iio_device_release_direct_mode - releases claim on direct mode > + * @indio_dev: the iio_dev associated with the device > + * > + * Release the claim. Device is no longer guaranteed to stay > + * in direct mode. > + * > + * Use with iio_device_claim_direct_mode() > + */ > +void iio_device_release_direct_mode(struct iio_dev *indio_dev) > +{ > + mutex_unlock(&indio_dev->mlock); > +} > +EXPORT_SYMBOL_GPL(iio_device_release_direct_mode); > + > subsys_initcall(iio_init); > module_exit(iio_exit); > > diff --git a/include/linux/iio/iio.h b/include/linux/iio/iio.h > index b2b1677..0b2773a 100644 > --- a/include/linux/iio/iio.h > +++ b/include/linux/iio/iio.h > @@ -527,6 +527,8 @@ void iio_device_unregister(struct iio_dev *indio_dev); > int devm_iio_device_register(struct device *dev, struct iio_dev *indio_dev); > void devm_iio_device_unregister(struct device *dev, struct iio_dev > *indio_dev); > int iio_push_event(struct iio_dev *indio_dev, u64 ev_code, s64 timestamp); > +int iio_device_claim_direct_mode(struct iio_dev *indio_dev); > +void iio_device_release_direct_mode(struct iio_dev *indio_dev); > > extern struct bus_type iio_bus_type; > > ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [RFC PATCH v2 0/2] iio: introduce iio_device_{claim|release}_direct_mode()
On 09/03/16 19:25, Alison Schofield wrote: > This patchset introduces two helper functions to simplify driver code > requiring the device to be locked in direct mode during execution of a > code path. The staging driver ad7192 is updated to demonstrate usage. > > This could be applied to approximately 18 known cases where the driver > is holding the lock in direct mode. Unknown cases might be those that > should, but don't, hold the lock. > > Alternate implementation: Generalize to support a claim on any mode. > Do iio_claim_mode(device,mode) where if the device is in *mode*, it > is guaranteed to stay that way until release is called. I considered > and rejected this option because a) not sure other modes would ever > need to be locked, and b) the semantic improvement is less when it > is generalized. I agree with your chosen approach. One general process comment. After the positive emails you received for v1, dropping the Request For Comment would have made sense marking the series as in your opinion ready to be applied. Jonathan > > This patchset was inspired by a discussion on linux-iio: > http://www.spinics.net/lists/linux-iio/msg18540.html > > Changes in v2: > o use iio_device prefix for new functions > o replace EINVAL with EBUSY on failure to claim direct mode > o update commit msg & changelog to reflect new prefix > > Alison Schofield (2): > iio: core: implement iio_device_{claim|release}_direct_mode() > staging: iio: ad7192: use iio_device_{claim|release}_direct_mode() > > drivers/iio/industrialio-core.c | 39 +++ > drivers/staging/iio/adc/ad7192.c | 24 +--- > include/linux/iio/iio.h | 2 ++ > 3 files changed, 50 insertions(+), 15 deletions(-) > ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: xgifb: Fix comment style
Fix comments to use * on subsequent lines. Signed-off-by: YU BO --- drivers/staging/xgifb/vb_init.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/xgifb/vb_init.c b/drivers/staging/xgifb/vb_init.c index 26b539bc6faf..c7f02c7db4a2 100644 --- a/drivers/staging/xgifb/vb_init.c +++ b/drivers/staging/xgifb/vb_init.c @@ -699,11 +699,11 @@ static void XGINew_CheckChannel(struct xgi_hw_device_info *HwDeviceExtension, break; case XG42: /* -XG42 SR14 D[3] Reserve -D[2] = 1, Dual Channel -= 0, Single Channel - -It's Different from Other XG40 Series. +* XG42 SR14 D[3] Reserve +* D[2] = 1, Dual Channel +* = 0, Single Channel +* +* It's Different from Other XG40 Series. */ if (XGINew_CheckFrequence(pVBInfo) == 1) { /* DDRII, DDR2x */ pVBInfo->ram_bus = 32; /* 32 bits */ -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] Staging: rtl8188eu: removes an unnecessary cast on a void pointer.
Patch to rtl8188e_rxdesc.c to remove an unnecessary cast on a void pointer. Signed-off-by: Ben Marsh --- drivers/staging/rtl8188eu/hal/rtl8188e_rxdesc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8188eu/hal/rtl8188e_rxdesc.c b/drivers/staging/rtl8188eu/hal/rtl8188e_rxdesc.c index 53cf3ba..4c78369 100644 --- a/drivers/staging/rtl8188eu/hal/rtl8188e_rxdesc.c +++ b/drivers/staging/rtl8188eu/hal/rtl8188e_rxdesc.c @@ -64,7 +64,7 @@ static void process_link_qual(struct adapter *padapter, void rtl8188e_process_phy_info(struct adapter *padapter, void *prframe) { - struct recv_frame *precvframe = (struct recv_frame *)prframe; + struct recv_frame *precvframe = prframe; /* Check RSSI */ process_rssi(padapter, precvframe); -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] Staging: most: Remove volatile usage
From: PrasannaKumar Muralidharan Remove unnecessary use of volatile for 'request_counter' and 'service_counter' members. Signed-off-by: PrasannaKumar Muralidharan --- drivers/staging/most/hdm-dim2/dim2_hal.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/most/hdm-dim2/dim2_hal.h b/drivers/staging/most/hdm-dim2/dim2_hal.h index 1c924e8..ee10ed9 100644 --- a/drivers/staging/most/hdm-dim2/dim2_hal.h +++ b/drivers/staging/most/hdm-dim2/dim2_hal.h @@ -40,10 +40,10 @@ struct dim_ch_state_t { struct int_ch_state { /* changed only in interrupt context */ - volatile int request_counter; + int request_counter; /* changed only in task context */ - volatile int service_counter; + int service_counter; u8 idx1; u8 idx2; -- 2.5.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: xgifb: Fix comment style
Fix comments to use trailing */ on separste lines. Signed-off-by: YU BO --- drivers/staging/xgifb/vb_init.c|3 ++- drivers/staging/xgifb/vb_setmode.c |3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/staging/xgifb/vb_init.c b/drivers/staging/xgifb/vb_init.c index 26b539bc6faf..572487388e81 100644 --- a/drivers/staging/xgifb/vb_init.c +++ b/drivers/staging/xgifb/vb_init.c @@ -355,7 +355,8 @@ static void XGINew_DDR2_DefaultRegister( unsigned long P3d4 = Port, P3c4 = Port - 0x10; /* keep following setting sequence, each setting in -* the same reg insert idle */ +* the same reg insert idle +*/ xgifb_reg_set(P3d4, 0x82, 0x77); xgifb_reg_set(P3d4, 0x86, 0x00); xgifb_reg_get(P3d4, 0x86); /* Insert read command for delay */ diff --git a/drivers/staging/xgifb/vb_setmode.c b/drivers/staging/xgifb/vb_setmode.c index f97c77d88173..240d4257bc2f 100644 --- a/drivers/staging/xgifb/vb_setmode.c +++ b/drivers/staging/xgifb/vb_setmode.c @@ -1992,7 +1992,8 @@ static void XGI_GetVBInfo(unsigned short ModeIdIndex, } /* LCD+TV can't support in slave mode -* (Force LCDA+TV->LCDB) */ +* (Force LCDA+TV->LCDB) +*/ if ((tempbx & SetInSlaveMode) && (tempbx & XGI_SetCRT2ToLCDA)) { tempbx ^= (SetCRT2ToLCD | XGI_SetCRT2ToLCDA | SetCRT2ToDualEdge); -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] Staging: most: Remove atomic_counter_t typedef
From: PrasannaKumar Muralidharan Remove atomic_counter_t typedef, use int instead. Signed-off-by: PrasannaKumar Muralidharan --- drivers/staging/most/hdm-dim2/dim2_hal.h | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/most/hdm-dim2/dim2_hal.h b/drivers/staging/most/hdm-dim2/dim2_hal.h index 8e9d5ea..1c924e8 100644 --- a/drivers/staging/most/hdm-dim2/dim2_hal.h +++ b/drivers/staging/most/hdm-dim2/dim2_hal.h @@ -38,14 +38,12 @@ struct dim_ch_state_t { u16 done_buffers; /* Number of completed buffers */ }; -typedef int atomic_counter_t; - struct int_ch_state { /* changed only in interrupt context */ - volatile atomic_counter_t request_counter; + volatile int request_counter; /* changed only in task context */ - volatile atomic_counter_t service_counter; + volatile int service_counter; u8 idx1; u8 idx2; -- 2.5.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] Staging: most: Remove __cplusplus check in heade files
From: PrasannaKumar Muralidharan Remove unnecessary __cplusplus check in header files as it is not required. Signed-off-by: PrasannaKumar Muralidharan --- drivers/staging/most/hdm-dim2/dim2_errors.h | 8 drivers/staging/most/hdm-dim2/dim2_hal.h| 8 drivers/staging/most/hdm-dim2/dim2_reg.h| 8 3 files changed, 24 deletions(-) diff --git a/drivers/staging/most/hdm-dim2/dim2_errors.h b/drivers/staging/most/hdm-dim2/dim2_errors.h index 5a713df..66343ba 100644 --- a/drivers/staging/most/hdm-dim2/dim2_errors.h +++ b/drivers/staging/most/hdm-dim2/dim2_errors.h @@ -15,10 +15,6 @@ #ifndef _MOST_DIM_ERRORS_H #define _MOST_DIM_ERRORS_H -#ifdef __cplusplus -extern "C" { -#endif - /** * MOST DIM errors. */ @@ -58,8 +54,4 @@ enum dim_errors_t { DIM_ERR_OVERFLOW, }; -#ifdef __cplusplus -} -#endif - #endif /* _MOST_DIM_ERRORS_H */ diff --git a/drivers/staging/most/hdm-dim2/dim2_hal.h b/drivers/staging/most/hdm-dim2/dim2_hal.h index fc73d4f..8e9d5ea 100644 --- a/drivers/staging/most/hdm-dim2/dim2_hal.h +++ b/drivers/staging/most/hdm-dim2/dim2_hal.h @@ -18,10 +18,6 @@ #include #include "dim2_reg.h" -#ifdef __cplusplus -extern "C" { -#endif - /* * The values below are specified in the hardware specification. * So, they should not be changed until the hardware specification changes. @@ -110,8 +106,4 @@ void dimcb_io_write(u32 __iomem *ptr32, u32 value); void dimcb_on_error(u8 error_id, const char *error_message); -#ifdef __cplusplus -} -#endif - #endif /* _DIM2_HAL_H */ diff --git a/drivers/staging/most/hdm-dim2/dim2_reg.h b/drivers/staging/most/hdm-dim2/dim2_reg.h index bcf6a79..e0837b6 100644 --- a/drivers/staging/most/hdm-dim2/dim2_reg.h +++ b/drivers/staging/most/hdm-dim2/dim2_reg.h @@ -17,10 +17,6 @@ #include -#ifdef __cplusplus -extern "C" { -#endif - struct dim2_regs { /* 0x00 */ u32 MLBC0; /* 0x01 */ u32 rsvd0[1]; @@ -166,8 +162,4 @@ enum { CAT_CL_MASK = DIM2_MASK(6) }; -#ifdef __cplusplus -} -#endif - #endif /* DIM2_OS62420_H */ -- 2.5.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel