[PATCH] staging/lustre/llite: Use memdup_user() rather than duplicating its implementation
From: Markus Elfring Date: Sun, 21 Aug 2016 11:30:57 +0200 Reuse existing functionality from memdup_user() instead of keeping duplicate source code. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/staging/lustre/lustre/llite/dir.c | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/drivers/staging/lustre/lustre/llite/dir.c b/drivers/staging/lustre/lustre/llite/dir.c index 031c9e4..8b70e42 100644 --- a/drivers/staging/lustre/lustre/llite/dir.c +++ b/drivers/staging/lustre/lustre/llite/dir.c @@ -1676,14 +1676,9 @@ out_poll: case LL_IOC_QUOTACTL: { struct if_quotactl *qctl; - qctl = kzalloc(sizeof(*qctl), GFP_NOFS); - if (!qctl) - return -ENOMEM; - - if (copy_from_user(qctl, (void __user *)arg, sizeof(*qctl))) { - rc = -EFAULT; - goto out_quotactl; - } + qctl = memdup_user((void __user *)arg, sizeof(*qctl)); + if (IS_ERR(qctl)) + return PTR_ERR(qctl); rc = quotactl_ioctl(sbi, qctl); @@ -1691,7 +1686,6 @@ out_poll: sizeof(*qctl))) rc = -EFAULT; -out_quotactl: kfree(qctl); return rc; } -- 2.9.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 09/13] staging/lustre: Add spaces preferred around that '{+, -, *, /, |, <<
On Sat, Aug 20, 2016 at 05:34:26PM -0400, Oleg Drokin wrote: > From: Emoly Liu > > This patch fixes all checkpatch occurences of > "CHECK: spaces preferred around that '{+,-,*,/,|,<<,>>,&}' (ctx:VxV)" > in Lustre code. > > Signed-off-by: Emoly Liu > Signed-off-by: Oleg Drokin > --- This patch doesn't apply at all :( can you rebase it and resend? thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 11/13] staging/lustre: Make alignment match open parenthesis
On Sat, Aug 20, 2016 at 05:34:28PM -0400, Oleg Drokin wrote: > From: Emoly Liu > > This patch fixes most of checkpatch occurences of > "CHECK: Alignment should match open parenthesis" > in Lustre code. > > Signed-off-by: Emoly Liu > Signed-off-by: Oleg Drokin > --- Doesn't apply :( ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 12/13] staging/lustre: Remove unused cp_error from struct cl_page
On Sat, Aug 20, 2016 at 05:34:29PM -0400, Oleg Drokin wrote: > cp_error member is not really set anywhere, so kill > it and the only printing user of it too. > > Signed-off-by: Oleg Drokin > --- > drivers/staging/lustre/lustre/include/cl_object.h | 2 -- > drivers/staging/lustre/lustre/obdclass/cl_page.c | 4 ++-- > 2 files changed, 2 insertions(+), 4 deletions(-) Doesn't apply :( ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: lustre: fix bare use of 'unsigned'
On Tue, Aug 16, 2016 at 04:24:05PM -0400, Anson Jacob wrote: > fix checkpatch.pl warning > Prefer 'unsigned int' to bare use of 'unsigned' > > Signed-off-by: Anson Jacob > --- > drivers/staging/lustre/lustre/include/cl_object.h | 14 +++--- > 1 file changed, 7 insertions(+), 7 deletions(-) Patch does not apply to my tree, can you rebase it against the latest staging-testing branch and resend? thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 3/3] staging: most: aim-cdev: relocate call to ida_init()
On Fri, Aug 19, 2016 at 01:09:35PM +0200, Christian Gromm wrote: > This patch moves the initialization of the idr structure towards the end > of the module's init routine. This keeps the code compact and eliminates > the need of having to call ida_destroy() in case the function exits with > an exception. > > Signed-off-by: Christian Gromm > --- > drivers/staging/most/aim-cdev/cdev.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/most/aim-cdev/cdev.c > b/drivers/staging/most/aim-cdev/cdev.c > index db6f458..3864009 100644 > --- a/drivers/staging/most/aim-cdev/cdev.c > +++ b/drivers/staging/most/aim-cdev/cdev.c > @@ -505,7 +505,6 @@ static int __init mod_init(void) > > INIT_LIST_HEAD(&channel_list); > spin_lock_init(&ch_list_lock); > - ida_init(&minor_id); > > err = alloc_chrdev_region(&aim_devno, 0, 50, "cdev"); > if (err < 0) > @@ -521,6 +520,7 @@ static int __init mod_init(void) > err = most_register_aim(&cdev_aim); > if (err) > goto dest_class; > + ida_init(&minor_id); But can't the minor_id be used before this call? most_register_aim() could call into a driver and have a cdev be wanted, right? thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 34/34] Staging: comedi: drivers: cd_pcidas: Compression of
On Sat, Jul 30, 2016 at 01:04:55PM -0700, Nadim almas wrote: > This patch compresses two lines in to a single line in file > cb_pcidas.c > if immediate return statement is found. It also removes variable > bytes_written as it is no longer needed. > > It is done using script Coccinelle. And coccinelle uses following > semantic patch for this compression function: > > @@ > expression e, ret; > @@ > > -ret = > +return > e; > -return ret > > Signed-off-by: Nadim Almas Your Subject: seems very odd, can you please fix it up? And where are the other 33 patches in this series? thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: comedi: dt2811: add parentheses to fix logic on s->subdev_flags
On Mon, Jul 25, 2016 at 11:25:25PM +0100, Colin King wrote: > From: Colin Ian King > > We need to add parentheses around ternary operations because currently > the expression SDF_READABLE | (it->options[2] == 1) always evaluates to > true, meaning s->subdev_flags is always assigned SDF_DIFF. Putting the > parentheses around the ternarary operations results in the intended > expression of SDF_REABLE logically or'd with one of SDF_DIFF, > SDF_COMMON or SDF_GROUND. > > Signed-off-by: Colin Ian King > Fixes: 7c9574090d30 ("staging: comedi: dt2811: simplify A/D reference > configuration") > Cc: # 4.7+ > Reviewed-by: Ian Abbott Dan sent a patch for this before you did :( And this went into 4.8-rc1, not 4.7. thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v2] staging: esp8089: add new driver
On Tue, Jun 21, 2016 at 08:17:14AM -0700, Greg KH wrote: > On Tue, Jun 21, 2016 at 07:35:24AM +0800, Icenowy Zheng wrote: > > The driver is only a working port of a badly written driver extracted from > > an old and vendor-specified kernel source. > > I cannot promise the code style (although I did indent -kr -i8). > > I cannot also promise the effect. > > I don't understand this at all, sorry. > > Why should we accept this driver? Who is going to maintain it? What > needs to be done to it? > > And why are you top-posting? :) Dropping from my queue due to lack of a response. If you fix it up, please resend it, but we need the answers to the above questions if you do so. thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v5 4/7] staging: speakup: replace spk_strlwr() with strlcpytolower()
On Wed, Aug 10, 2016 at 02:04:54PM -0700, Markus Mayer wrote: > After introducing generic strltolower() and strtolower(), spk_strlwr() > is no longer needed. > > Signed-off-by: Markus Mayer > Acked-by: Samuel Thibault > Acked-by: Chris Brannon > --- > drivers/staging/speakup/kobjects.c| 3 +-- > drivers/staging/speakup/main.c| 3 ++- > drivers/staging/speakup/speakup.h | 1 - > drivers/staging/speakup/varhandlers.c | 12 > 4 files changed, 3 insertions(+), 16 deletions(-) Acked-by: Greg Kroah-Hartman ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] Code style fix, line size was > 80.
On Sun, Jul 10, 2016 at 12:47:29PM -0400, Alec Missine wrote: > Signed-off-by: Alec Missine > --- > drivers/staging/dgnc/dgnc_driver.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) I can't take patches with no changelog text at all, sorry. greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 1/1] staging: i4l: pcbit: Remove explicit NULL comparison
On Tue, Aug 02, 2016 at 05:13:14PM +0530, shyam saini wrote: > Remove the explicit NULL comparison and rewrite in a compact form using > Coccinelle > > Signed-off-by: shyam saini > --- > drivers/staging/i4l/pcbit/callbacks.c | 4 ++-- > drivers/staging/i4l/pcbit/capi.c | 18 +- > drivers/staging/i4l/pcbit/drv.c | 14 +++--- > drivers/staging/i4l/pcbit/layer2.c| 9 - > 4 files changed, 22 insertions(+), 23 deletions(-) Doesn't apply to my tree, can you please rebase and resend it? thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 1/6] staging: i4l: icn: do not use return as a function
On Sat, Jun 11, 2016 at 10:10:50PM +0100, Sudip Mukherjee wrote: > return is not a function so no need to use the parenthesis. > > Signed-off-by: Sudip Mukherjee > --- > drivers/staging/i4l/icn/icn.c | 16 > 1 file changed, 8 insertions(+), 8 deletions(-) Not all patches in this series would apply, can you please rebase and resend the ones I didn't take? thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] Staging: wlan-ng: fixed "line over 80 characters" warnings
On Sat, Aug 06, 2016 at 08:20:16PM +0300, Claudiu Beznea wrote: > This patch fix "line over 80 characters" checkpatch.pl > warnings. In cfg80211.c file some of these warnings > were fixed by adding duplicate code in a separate > function. > > Signed-off-by: Claudiu Beznea > --- > drivers/staging/wlan-ng/cfg80211.c | 148 > > drivers/staging/wlan-ng/hfa384x.h | 2 +- > drivers/staging/wlan-ng/p80211hdr.h | 3 +- > 3 files changed, 68 insertions(+), 85 deletions(-) > > diff --git a/drivers/staging/wlan-ng/cfg80211.c > b/drivers/staging/wlan-ng/cfg80211.c > index f46dfe6..8523cd5 100644 > --- a/drivers/staging/wlan-ng/cfg80211.c > +++ b/drivers/staging/wlan-ng/cfg80211.c > @@ -97,6 +97,45 @@ static int prism2_domibset_pstr32(wlandevice_t *wlandev, > return p80211req_dorequest(wlandev, (u8 *)&msg); > } > > +static int prism2_key_index_to_did(u8 key_index, u32 *did) > +{ > + int err = 0; > + > + if (!did) { > + err = -EINVAL; > + goto exit; > + } > + > + switch (key_index) { > + case 0: > + *did = > + DIDmib_dot11smt_dot11WEPDefaultKeysTable_dot11WEPDefaultKey0; > + break; Ick! Is that readable? Please make sane fixes, perhaps the original was just fine? thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] Staging: wlan-ng: fixed "do not add new typedefs" warnings
On Sat, Jul 30, 2016 at 07:11:45PM +0300, Claudiu Beznea wrote: > This patch suppress "do not add new typedefs" checkpatch.pl > warnings. After this suppression some lines needs to be > changed to avoid new checkpatch.pl complains (e.g. 80 > chars per line checkpatch.pl warning) > > Signed-off-by: Claudiu Beznea Just fix one typedef at a time, this patch is way too big to review properly. It also doesn't apply to my tree, so even if I wanted to take it, I couldn't :( Please break it up and send it as a patch series. thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] Staging: wlan-ng: removed unused code
On Mon, Aug 08, 2016 at 08:46:20PM +0300, Claudiu Beznea wrote: > This patch removes unused code from wlan-ng driver. > > Signed-off-by: Claudiu Beznea > --- > drivers/staging/wlan-ng/p80211types.h | 43 > --- > 1 file changed, 43 deletions(-) > > diff --git a/drivers/staging/wlan-ng/p80211types.h > b/drivers/staging/wlan-ng/p80211types.h > index 8cb4fc6..256c742 100644 > --- a/drivers/staging/wlan-ng/p80211types.h > +++ b/drivers/staging/wlan-ng/p80211types.h > @@ -205,20 +205,11 @@ typedef struct p80211enumpair { > char *name; > } p80211enumpair_t; > > -typedef struct p80211enum { > - int nitems; > - p80211enumpair_t *list; > -} p80211enum_t; > - > /**/ > /* The following structure types are used to store data items in */ > /* messages. */ > > /* Template pascal string */ > -typedef struct p80211pstr { > - u8 len; > -} __packed p80211pstr_t; > - > typedef struct p80211pstrd { > u8 len; > u8 data[0]; > @@ -301,14 +292,6 @@ typedef struct p80211item_pstr32 { > p80211pstr32_t data; > } __packed p80211item_pstr32_t; > > -/* message data item for OCTETSTR, DISPLAYSTR */ > -typedef struct p80211item_pstr255 { > - u32 did; > - u16 status; > - u16 len; > - p80211pstr255_t data; > -} __packed p80211item_pstr255_t; > - > /* message data item for UNK 392, namely mib items */ > typedef struct p80211item_unk392 { > u32 did; > @@ -346,30 +329,4 @@ typedef void (*p80211_fromtext_t) (struct catlistitem *, > u32 did, u8 *itembuf, > char *textbuf); > typedef u32(*p80211_valid_t) (struct catlistitem *, u32 did, u8 *itembuf); > > -/**/ > -/* Enumeration Lists */ > -/* The following are the external declarations */ > -/* for all enumerations */ > - > -extern p80211enum_t MKENUMNAME(truth); > -extern p80211enum_t MKENUMNAME(ifstate); > -extern p80211enum_t MKENUMNAME(powermgmt); > -extern p80211enum_t MKENUMNAME(bsstype); > -extern p80211enum_t MKENUMNAME(authalg); > -extern p80211enum_t MKENUMNAME(phytype); > -extern p80211enum_t MKENUMNAME(temptype); > -extern p80211enum_t MKENUMNAME(regdomain); > -extern p80211enum_t MKENUMNAME(ccamode); > -extern p80211enum_t MKENUMNAME(diversity); > -extern p80211enum_t MKENUMNAME(scantype); > -extern p80211enum_t MKENUMNAME(resultcode); > -extern p80211enum_t MKENUMNAME(reason); > -extern p80211enum_t MKENUMNAME(status); > -extern p80211enum_t MKENUMNAME(msgcode); > -extern p80211enum_t MKENUMNAME(msgitem_status); > - > -extern p80211enum_t MKENUMNAME(lnxroam_reason); > - > -extern p80211enum_t MKENUMNAME(p2preamble); > - > #endif /* _P80211TYPES_H */ > -- > 1.9.1 I don't see any "code" removed, only unused typedefs and externs. Please be more specific in your changelog comments. thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 1/3] include: linux: visorbus: Add visorbus to include/linux directory
On Fri, Jun 10, 2016 at 11:23:54PM -0400, David Kershner wrote: > Update include/linux to include the s-Par associated common include > header files needed for the s-Par visorbus. > > Since we have now moved the include directories over to > include/linux/visorbus this patch makes all of the visor > drivers visorbus, visorinput, visornic, and visorhba use > the new include folders. > > Signed-off-by: David Kershner > Reviewed-by: Tim Sell > --- > drivers/staging/unisys/MAINTAINERS| 2 +- > drivers/staging/unisys/visorbus/Makefile | 2 -- > drivers/staging/unisys/visorbus/controlvmchannel.h| 2 +- > drivers/staging/unisys/visorbus/vbuschannel.h | 3 ++- > drivers/staging/unisys/visorbus/visorbus_main.c | 6 +++--- > drivers/staging/unisys/visorbus/visorchannel.c| 4 ++-- > drivers/staging/unisys/visorbus/visorchipset.c| 8 > > drivers/staging/unisys/visorbus/vmcallinterface.h | 5 ++--- > drivers/staging/unisys/visorhba/Makefile | 2 -- > drivers/staging/unisys/visorhba/visorhba_main.c | 5 ++--- > drivers/staging/unisys/visorinput/Makefile| 2 -- > drivers/staging/unisys/visorinput/visorinput.c| 6 +++--- > drivers/staging/unisys/visornic/Makefile | 2 -- > drivers/staging/unisys/visornic/visornic_main.c | 5 ++--- > .../staging/unisys/include => include/linux/visorbus}/channel.h | 0 > .../unisys/include => include/linux/visorbus}/channel_guid.h | 0 > .../unisys/include => include/linux/visorbus}/diagchannel.h | 0 > .../unisys/include => include/linux/visorbus}/guestlinuxdebug.h | 0 > .../staging/unisys/include => include/linux/visorbus}/iochannel.h | 0 > .../staging/unisys/include => include/linux/visorbus}/version.h | 0 > .../staging/unisys/include => include/linux/visorbus}/visorbus.h | 0 > 21 files changed, 22 insertions(+), 32 deletions(-) > rename {drivers/staging/unisys/include => include/linux/visorbus}/channel.h > (100%) > rename {drivers/staging/unisys/include => > include/linux/visorbus}/channel_guid.h (100%) > rename {drivers/staging/unisys/include => > include/linux/visorbus}/diagchannel.h (100%) > rename {drivers/staging/unisys/include => > include/linux/visorbus}/guestlinuxdebug.h (100%) > rename {drivers/staging/unisys/include => > include/linux/visorbus}/iochannel.h (100%) > rename {drivers/staging/unisys/include => include/linux/visorbus}/version.h > (100%) > rename {drivers/staging/unisys/include => include/linux/visorbus}/visorbus.h > (100%) > > diff --git a/drivers/staging/unisys/MAINTAINERS > b/drivers/staging/unisys/MAINTAINERS > index 1f0425b..146a8c3 100644 > --- a/drivers/staging/unisys/MAINTAINERS > +++ b/drivers/staging/unisys/MAINTAINERS > @@ -1,5 +1,5 @@ > Unisys s-Par drivers > M: David Kershner > S: Maintained > -F: Documentation/s-Par/overview.txt > +F: Documentation/visorbus.txt > F: drivers/staging/unisys/ This MAINTAINERS change doesn't have anything to do with moving the .h files around :( ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] Staging: wlan-ng: improved code in p80211req.c file
On Sat, Aug 20, 2016 at 06:20:00PM +0300, Claudiu Beznea wrote: > This patch improves code from p80211req.c file by removing > duplicate code, by keeping count of returning code of > the called functions and also aesthetically. > > Signed-off-by: Claudiu Beznea > --- > drivers/staging/wlan-ng/p80211req.c | 163 > +++- > 1 file changed, 84 insertions(+), 79 deletions(-) > > diff --git a/drivers/staging/wlan-ng/p80211req.c > b/drivers/staging/wlan-ng/p80211req.c > index 4b84b56..900635e 100644 > --- a/drivers/staging/wlan-ng/p80211req.c > +++ b/drivers/staging/wlan-ng/p80211req.c > @@ -72,10 +72,12 @@ > #include "p80211metastruct.h" > #include "p80211req.h" > > -static void p80211req_handlemsg(wlandevice_t *wlandev, struct p80211msg > *msg); > -static void p80211req_mibset_mibget(wlandevice_t *wlandev, > +static int p80211req_handlemsg(wlandevice_t *wlandev, struct p80211msg *msg); > +static int p80211req_mibset_mibget(wlandevice_t *wlandev, > struct p80211msg_dot11req_mibget *mib_msg, > int isget); > +static void p80211req_handle_action(struct wlandevice *wlandev, u32 *data, > + int isget, u32 flag); > > /* > * p80211req_dorequest > @@ -96,6 +98,7 @@ static void p80211req_mibset_mibget(wlandevice_t *wlandev, > int p80211req_dorequest(wlandevice_t *wlandev, u8 *msgbuf) > { > struct p80211msg *msg = (struct p80211msg *) msgbuf; > + int rc = 0; > > /* Check to make sure the MSD is running */ > if (!((wlandev->msdstate == WLAN_MSD_HWPRESENT && > @@ -107,7 +110,7 @@ int p80211req_dorequest(wlandevice_t *wlandev, u8 *msgbuf) > > /* Check Permissions */ > if (!capable(CAP_NET_ADMIN) && > - (msg->msgcode != DIDmsg_dot11req_mibget)) { > + (msg->msgcode != DIDmsg_dot11req_mibget)) { > netdev_err(wlandev->netdev, This is a fine change, but you are trying to do too many different things in this patch. Remember, only do one type of thing per patch please. thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] Staging: android: ion: fix parenthesis alignment
On Thu, Aug 18, 2016 at 07:27:31PM -0600, Ben LeMasurier wrote: > This fixes remaining checkpatch.pl "Alignment should match open > parenthesis" issues. > > Signed-off-by: Ben LeMasurier > --- > drivers/staging/android/ion/ion.c | 42 > +- > drivers/staging/android/ion/ion_chunk_heap.c | 12 > drivers/staging/android/ion/ion_cma_heap.c | 2 +- > drivers/staging/android/ion/ion_dummy_driver.c | 10 +++--- > drivers/staging/android/ion/ion_page_pool.c| 4 +-- > drivers/staging/android/ion/ion_system_heap.c | 12 > 6 files changed, 41 insertions(+), 41 deletions(-) Doesn't apply to my tree :( Can you rebase it against the latest staging-testing branch of the staging.git tree and resend? thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] fbtft: limit transfer length by spi device limit
On Thu, May 26, 2016 at 07:25:22PM -, Michal Suchanek wrote: > Some SPI controllers can transfer only small piece of data at a time. > Since SPI core gained a function to get the maximum transfer length use > it. > > Signed-off-by: Michal Suchanek > Acked-by: Noralf Trønnes > --- > > Tested on sunxi spi with DMA enabled and disabled. Makes a visible speed > difference and display works in either case. > > drivers/staging/fbtft/fbtft-core.c | 9 + > 1 file changed, 9 insertions(+) This patch adds a build warning to the tree, so I can't take it. Please fix up and resend. thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 1/2] staging: dgnc: change a parameter from tty_struct to
On Fri, Aug 19, 2016 at 10:04:52AM +0900, Daeseok Youn wrote: > The dgnc_maxcps_room() function must be called only for print device. > The if-statement for checking print device checks before calling > maxcps_room() and also this function doesn't need to have any > data except channel_t. > > Signed-off-by: Daeseok Youn > --- > drivers/staging/dgnc/dgnc_tty.c | 18 +- > 1 file changed, 5 insertions(+), 13 deletions(-) Your subject line doesn't make much sense, does it? :( Please fix up and resend. thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] Staging: skein: threefish_block: fixed multiple blank line issue
On Wed, May 25, 2016 at 11:37:35PM -0700, Bhushan Gopala Reddy wrote: > Fixed coding style issue > > Signed-off-by: Bhushan Gopala Reddy You need to be more specific in the changelog please. Also, this was NAKed by the maintainer the last time it came up, so I can't take it... thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: dgnc: Fix line over 80 characters
On Wed, Aug 17, 2016 at 03:59:09PM +0200, Robin Naundorf wrote: > Fix 'line over 80 characters' checkpatch.pl > warning > > Signed-off-by: Robin Naundorf > --- > drivers/staging/dgnc/dgnc_driver.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Someone else sent this same patch just before you did, sorry :( ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 2/2] staging: dgnc: refactor the dgnc_maxcps_room() to improve
On Fri, Aug 19, 2016 at 10:05:19AM +0900, Daeseok Youn wrote: > The whole code in dgnc_maxcps_room() function surrounds with > one if-statement for checking channel's maxcps and buffer size. > I tried to separate the logic for this function from if-condition. > > Signed-off-by: Daeseok Youn > --- > drivers/staging/dgnc/dgnc_tty.c | 46 > + > 1 file changed, 24 insertions(+), 22 deletions(-) Have you tested this on the hardware? Until you do, I'm loath to take changes like this, especially as you are adding more code than you remove :( sorry, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: octeon: Use IS_ENABLED() instead of checking for built-in or module
On Thu, Jul 14, 2016 at 01:06:09PM -0400, Javier Martinez Canillas wrote: > The IS_ENABLED() macro checks if a Kconfig symbol has been enabled either > built-in or as a module, use that macro instead of open coding the same. > > Signed-off-by: Javier Martinez Canillas > Acked-by: David Daney > --- > > drivers/staging/octeon/ethernet.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/octeon/ethernet.c > b/drivers/staging/octeon/ethernet.c > index e9cd5f242921..c0c62143ffc8 100644 > --- a/drivers/staging/octeon/ethernet.c > +++ b/drivers/staging/octeon/ethernet.c > @@ -238,7 +238,7 @@ static int cvm_oct_common_change_mtu(struct net_device > *dev, int new_mtu) > struct octeon_ethernet *priv = netdev_priv(dev); > int interface = INTERFACE(priv->port); > int index = INDEX(priv->port); > -#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE) > +#if IS_ENABLED(CONFIG_VLAN_8021Q) > int vlan_bytes = 4; > #else > int vlan_bytes = 0; Fails to apply to the tree :( ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] Staging:sm750fb:ddk750_chip.c:Fixed coding style in comments
On Sun, Jun 12, 2016 at 07:00:41PM +0530, Rithvik Patibandla wrote: > The following patch fixes format of some comments. > > Signed-off-by: Rithvik Patibandla > --- > drivers/staging/sm750fb/ddk750_chip.c | 71 > +++ > 1 file changed, 38 insertions(+), 33 deletions(-) > > diff --git a/drivers/staging/sm750fb/ddk750_chip.c > b/drivers/staging/sm750fb/ddk750_chip.c > index f80ee77..8cb5cb9 100644 > --- a/drivers/staging/sm750fb/ddk750_chip.c > +++ b/drivers/staging/sm750fb/ddk750_chip.c > @@ -70,11 +70,11 @@ static void setChipClock(unsigned int frequency) > pll.inputFreq = DEFAULT_INPUT_CLOCK; /* Defined in CLOCK.H */ > pll.clockType = MXCLK_PLL; > > - /* > - * Call calcPllValue() to fill up the other fields for PLL > structure. > - * Sometime, the chip cannot set up the exact clock required by > User. > - * Return value from calcPllValue() gives the actual possible > clock. > - */ > + /* > + * Call calcPllValue() to fill up the other fields for PLL structure. > + * Sometime, the chip cannot set up the exact clock required by User. > + * Return value from calcPllValue() gives the actual possible clock. > + */ Really? Does that look correct to you? hint your indentation is totally wrong :( Please be more careful... greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging/rtl8188eu/core/rtw_cmd: Fixes semaphore locking
On Tue, Aug 09, 2016 at 01:34:57AM -0400, Lidza Louina wrote: > The code did not lock the &pcmdpriv->terminate_cmdthread_sema before using it. > The code had an up() where a down() should've been. This patch fixes that. > > Signed-off-by: Lidza Louina > --- > drivers/staging/rtl8188eu/core/rtw_cmd.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/rtl8188eu/core/rtw_cmd.c > b/drivers/staging/rtl8188eu/core/rtw_cmd.c > index 7748523..16f0b19 100644 > --- a/drivers/staging/rtl8188eu/core/rtw_cmd.c > +++ b/drivers/staging/rtl8188eu/core/rtw_cmd.c > @@ -162,7 +162,7 @@ int rtw_cmd_thread(void *context) > allow_signal(SIGTERM); > > pcmdpriv->cmdthd_running = true; > - up(&pcmdpriv->terminate_cmdthread_sema); > + down(&pcmdpriv->terminate_cmdthread_sema); > > RT_TRACE(_module_rtl871x_cmd_c_, _drv_info_, ("start r871x > rtw_cmd_thread \n")); > > -- > 2.7.4 This path is corrupted somehow and doesn't apply at all :( Can you see what went wrong with your email client and try again? thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v2 4/4] rtl8712: pwrctrl_priv: Replace semaphore lock with mutex
On Thu, Jun 02, 2016 at 09:54:10AM +0530, Binoy Jayan wrote: > The semaphore 'lock' in 'pwrctrl_priv' is used as a simple mutex, so it > should be written as one. Semaphores are going away in the future. > _enter_pwrlock was using down_interruptible(), so the lock could be broken > by sending a signal. This could be a bug, because nothing checks the return > code here. Hence, using mutex_lock instead of the interruptible version. > Removing the now unused _enter_pwrlock and _down_sema. > > Signed-off-by: Binoy Jayan > Reviewed-by: Arnd Bergmann > Tested-by: Larry Finger > --- > This patch depends on the following patch: > rtl8712: intf_priv: Replace semaphore lock with completion This one patch doesn't apply to my tree for some odd reason. Can you rebase it on my staging-testing branch and resend it? thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] Staging: rtl8723au: rtw_xmit: Fixed operators spacing style issues
On Tue, Aug 02, 2016 at 08:05:30PM +0200, Shiva Kerdel wrote: > Fixed spaces around operators to fix their coding style issues. > > Signed-off-by: Shiva Kerdel > --- > drivers/staging/rtl8723au/core/rtw_xmit.c | 24 > 1 file changed, 12 insertions(+), 12 deletions(-) Does not apply properly to the tree :( ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging/rtlwifi: use s8 instead of char
On Wed, Jun 15, 2016 at 10:35:22PM +0200, Arnd Bergmann wrote: > Compiling the rtlwifi drivers for ARM with gcc -Wextra warns about lots of > incorrect code that results from 'char' being unsigned here, e.g. > > staging/rtl8192e/rtl8192e/r8192E_phy.c:1072:36: error: comparison is always > false due to limited range of data type [-Werror=type-limits] > staging/rtl8192e/rtl8192e/r8192E_phy.c:1104:36: error: comparison is always > false due to limited range of data type [-Werror=type-limits] > staging/rtl8192e/rtl8192e/rtl_core.c:1987:16: error: comparison is always > false due to limited range of data type [-Werror=type-limits] > staging/rtl8192e/rtl8192e/rtl_dm.c:782:37: error: comparison is always false > due to limited range of data type [-Werror=type-limits] > staging/rtl8192e/rtl819x_TSProc.c:326:14: error: comparison is always true > due to limited range of data type [-Werror=type-limits] > staging/rtl8192e/rtllib_softmac_wx.c:465:16: error: comparison is always > false due to limited range of data type [-Werror=type-limits] > staging/rtl8192u/r8192U_core.c:4150:16: error: comparison is always false due > to limited range of data type [-Werror=type-limits] > staging/rtl8192u/r8192U_dm.c:646:50: error: comparison is always false due to > limited range of data type [-Werror=type-limits] > > This patch changes all uses of 'char' in these drivers that refer to > 8-bit integers to use 's8' instead, which is signed on all architectures. > > Signed-off-by: Arnd Bergmann > --- > drivers/staging/rtl8188eu/core/rtw_ap.c| 2 +- > drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 8 > drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c | 2 +- > drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 6 +++--- > drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 8 > drivers/staging/rtl8192e/rtl819x_TSProc.c | 2 +- > drivers/staging/rtl8192u/ieee80211/ieee80211.h | 4 ++-- > drivers/staging/rtl8192u/r8192U.h | 4 ++-- > drivers/staging/rtl8192u/r8192U_core.c | 14 +++--- > 9 files changed, 25 insertions(+), 25 deletions(-) Doesn't apply anymore as I think you sent parts of this to me already :( ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 3/3] drivers: Add visorbus to the drivers/virt directory
On Fri, Jun 10, 2016 at 11:23:56PM -0400, David Kershner wrote: > visorbus is currently located at drivers/staging/visorbus, > this patch moves it to drivers/virt. > > Signed-off-by: David Kershner > Reviewed-by: Tim Sell > --- > drivers/staging/unisys/Kconfig| 3 +-- > drivers/staging/unisys/Makefile | 1 - > drivers/virt/Kconfig | 2 ++ > drivers/virt/Makefile | 1 + > drivers/{staging/unisys => virt}/visorbus/Kconfig | 0 > drivers/{staging/unisys => virt}/visorbus/Makefile| 0 > drivers/{staging/unisys => virt}/visorbus/controlvmchannel.h | 0 > drivers/{staging/unisys => virt}/visorbus/controlvmcompletionstatus.h | 0 > drivers/{staging/unisys => virt}/visorbus/iovmcall_gnuc.h | 0 > drivers/{staging/unisys => virt}/visorbus/vbuschannel.h | 0 > drivers/{staging/unisys => virt}/visorbus/vbusdeviceinfo.h| 0 > drivers/{staging/unisys => virt}/visorbus/vbushelper.h| 0 > drivers/{staging/unisys => virt}/visorbus/visorbus_main.c | 0 > drivers/{staging/unisys => virt}/visorbus/visorbus_private.h | 0 > drivers/{staging/unisys => virt}/visorbus/visorchannel.c | 0 > drivers/{staging/unisys => virt}/visorbus/visorchipset.c | 0 I picked one random file here, this last one, and found a number of "odd" things in it. So, given that I can't really comment on the patch itself, I'm going to include the file below, quote it, and then provide some comments, ok? > /* visorchipset_main.c > > * > * Copyright (C) 2010 - 2015 UNISYS CORPORATION > * All rights reserved. > * > * This program is free software; you can redistribute it and/or modify it > * under the terms and conditions of the GNU General Public License, > * version 2, as published by the Free Software Foundation. > * > * This program is distributed in the hope that it will be useful, but > * WITHOUT ANY WARRANTY; without even the implied warranty of > * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or > * NON INFRINGEMENT. See the GNU General Public License for more > * details. > */ > > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > > #include "channel_guid.h" > #include "controlvmchannel.h" > #include "controlvmcompletionstatus.h" > #include "guestlinuxdebug.h" > #include "version.h" Why do you have this "version.h" file anyway? It should be deleted, as parts of it are obviously wrong :( > #include "visorbus.h" > #include "visorbus_private.h" > #include "vmcallinterface.h" That's loads of "private" .h files, are they all really needed? > > #define CURRENT_FILE_PC VISOR_CHIPSET_PC_visorchipset_main_c ??? > > #define MAX_NAME_SIZE 128 name of what? I don't think you even use this in the file! > #define MAX_IP_SIZE 50 Huh? You don't use this either? > #define MAXOUTSTANDINGCHANNELCOMMAND 256 Here, have a '_', they are free. But again, I don't see this being used. > #define POLLJIFFIES_CONTROLVMCHANNEL_FAST 1 > #define POLLJIFFIES_CONTROLVMCHANNEL_SLOW 100 Right-hand alignment? That's a glutton for punishment. > > #define MAX_CONTROLVM_PAYLOAD_BYTES (1024 * 128) > > #define VISORCHIPSET_MMAP_CONTROLCHANOFFSET 0x > > #define UNISYS_SPAR_LEAF_ID 0x4000 > > /* The s-Par leaf ID returns "UnisysSpar64" encoded across ebx, ecx, edx */ > #define UNISYS_SPAR_ID_EBX 0x73696e55 > #define UNISYS_SPAR_ID_ECX 0x70537379 > #define UNISYS_SPAR_ID_EDX 0x34367261 > > /* > * Module parameters > */ > static int visorchipset_major; major number should not be a module option, just grab a dynamic one and run with it please. > static int visorchipset_visorbusregwait = 1; /* default is on */ Why even have this option? Who is going to ever change it? Why would they? > static unsigned long controlvm_payload_bytes_buffered; Not a module option :( > static u32 dump_vhba_bus; Not an option, only ever set, never tested :( > > static int > visorchipset_open(struct inode *inode, struct file *file) > { > unsigned int minor_number = iminor(inode); > > if (minor_number) > return -ENODEV; What is this check for? You only ever want one minor number? If so, why do you want a whole major number? > file->private_data = NULL; Isn't this already true? > return 0; > } > > static int > visorchipset_release(struct inode *inode, struct file *file) > { > return 0; > } If you do nothing in a release function, then don't provide it at all. > > /* > * When the controlvm channel is idle for at least MIN_IDLE_SECONDS, > * we switch to slow polling mode. As soon as we get a controlvm > * message, we switch back to fast polling mode. > */ > #define MIN_IDLE_SECONDS
[PATCH 0/3] Rebased Lustre patches
Here are the three patches rebased after merge conflict with some other patches that were accepted first. Oleg Drokin (3): staging/lustre: Add spaces preferred around that '{+,-,*,/,|,<<,>>,&}' staging/lustre: Make alignment match open parenthesis staging/lustre: Remove unused cp_error from struct cl_page .../staging/lustre/include/linux/libcfs/libcfs.h | 6 +- .../lustre/include/linux/libcfs/libcfs_debug.h | 10 +- .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c| 2 +- .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c | 5 +- .../staging/lustre/lnet/klnds/socklnd/socklnd.h| 2 +- .../lustre/lnet/libcfs/linux/linux-crypto.c| 4 +- drivers/staging/lustre/lustre/include/cl_object.h | 4 +- drivers/staging/lustre/lustre/include/lu_object.h | 3 +- .../lustre/lustre/include/lustre/lustre_idl.h | 28 +- .../lustre/lustre/include/lustre/lustre_user.h | 2 +- drivers/staging/lustre/lustre/include/lustre_fid.h | 2 +- .../staging/lustre/lustre/include/lustre_lite.h| 2 +- .../staging/lustre/lustre/include/obd_support.h| 13 +- drivers/staging/lustre/lustre/ldlm/ldlm_extent.c | 4 +- drivers/staging/lustre/lustre/ldlm/ldlm_flock.c| 4 +- drivers/staging/lustre/lustre/ldlm/ldlm_internal.h | 17 +- drivers/staging/lustre/lustre/ldlm/ldlm_lib.c | 8 +- drivers/staging/lustre/lustre/ldlm/ldlm_lock.c | 26 +- drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c| 21 +- drivers/staging/lustre/lustre/ldlm/ldlm_pool.c | 4 +- drivers/staging/lustre/lustre/ldlm/ldlm_request.c | 14 +- drivers/staging/lustre/lustre/ldlm/ldlm_resource.c | 5 +- drivers/staging/lustre/lustre/llite/file.c | 4 +- drivers/staging/lustre/lustre/llite/llite_lib.c| 25 +- drivers/staging/lustre/lustre/llite/llite_mmap.c | 4 +- drivers/staging/lustre/lustre/llite/lproc_llite.c | 14 +- drivers/staging/lustre/lustre/llite/namei.c| 4 +- drivers/staging/lustre/lustre/llite/rw.c | 9 +- drivers/staging/lustre/lustre/llite/rw26.c | 2 +- drivers/staging/lustre/lustre/llite/statahead.c| 3 +- drivers/staging/lustre/lustre/llite/super25.c | 4 +- drivers/staging/lustre/lustre/llite/vvp_object.c | 2 +- drivers/staging/lustre/lustre/llite/vvp_page.c | 4 +- drivers/staging/lustre/lustre/lov/lov_ea.c | 3 +- drivers/staging/lustre/lustre/lov/lov_obd.c| 18 +- drivers/staging/lustre/lustre/lov/lov_pool.c | 2 +- drivers/staging/lustre/lustre/mdc/mdc_locks.c | 5 +- drivers/staging/lustre/lustre/mdc/mdc_reint.c | 5 +- drivers/staging/lustre/lustre/obdclass/cl_page.c | 4 +- drivers/staging/lustre/lustre/obdclass/debug.c | 4 +- drivers/staging/lustre/lustre/obdclass/genops.c| 2 +- .../staging/lustre/lustre/obdclass/obd_config.c| 12 +- drivers/staging/lustre/lustre/obdclass/obd_mount.c | 8 +- drivers/staging/lustre/lustre/obdclass/obdo.c | 6 +- .../staging/lustre/lustre/obdecho/echo_internal.h | 4 +- drivers/staging/lustre/lustre/osc/osc_cache.c | 6 +- .../staging/lustre/lustre/osc/osc_cl_internal.h| 2 +- drivers/staging/lustre/lustre/osc/osc_io.c | 2 +- drivers/staging/lustre/lustre/osc/osc_request.c| 12 +- drivers/staging/lustre/lustre/ptlrpc/import.c | 6 +- .../staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c| 2 +- drivers/staging/lustre/lustre/ptlrpc/niobuf.c | 3 +- .../staging/lustre/lustre/ptlrpc/pack_generic.c| 5 +- drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c | 4 +- drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c| 5 +- drivers/staging/lustre/lustre/ptlrpc/sec_plain.c | 18 +- drivers/staging/lustre/lustre/ptlrpc/service.c | 24 +- drivers/staging/lustre/lustre/ptlrpc/wiretest.c| 288 ++--- 58 files changed, 368 insertions(+), 343 deletions(-) -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 3/3] staging/lustre: Remove unused cp_error from struct cl_page
cp_error member is not really set anywhere, so kill it and the only printing user of it too. Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/include/cl_object.h | 2 -- drivers/staging/lustre/lustre/obdclass/cl_page.c | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/lustre/lustre/include/cl_object.h b/drivers/staging/lustre/lustre/include/cl_object.h index 4c00be2..5e63a27 100644 --- a/drivers/staging/lustre/lustre/include/cl_object.h +++ b/drivers/staging/lustre/lustre/include/cl_object.h @@ -701,8 +701,6 @@ enum cl_page_type { struct cl_page { /** Reference counter. */ atomic_t cp_ref; - /** Transfer error. */ - int cp_error; /** An object this page is a part of. Immutable after creation. */ struct cl_object*cp_obj; /** vmpage */ diff --git a/drivers/staging/lustre/lustre/obdclass/cl_page.c b/drivers/staging/lustre/lustre/obdclass/cl_page.c index bd71859..80c6e0e 100644 --- a/drivers/staging/lustre/lustre/obdclass/cl_page.c +++ b/drivers/staging/lustre/lustre/obdclass/cl_page.c @@ -981,9 +981,9 @@ void cl_page_header_print(const struct lu_env *env, void *cookie, lu_printer_t printer, const struct cl_page *pg) { (*printer)(env, cookie, - "page@%p[%d %p %d %d %d %p %p]\n", + "page@%p[%d %p %d %d %p %p]\n", pg, atomic_read(&pg->cp_ref), pg->cp_obj, - pg->cp_state, pg->cp_error, pg->cp_type, + pg->cp_state, pg->cp_type, pg->cp_owner, pg->cp_req); } EXPORT_SYMBOL(cl_page_header_print); -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 2/3] staging/lustre: Make alignment match open parenthesis
This patch fixes most of checkpatch occurences of "CHECK: Alignment should match open parenthesis" in Lustre code. Signed-off-by: Emoly Liu Signed-off-by: Oleg Drokin --- .../staging/lustre/include/linux/libcfs/libcfs.h | 6 +- .../lustre/include/linux/libcfs/libcfs_debug.h | 10 +- .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c| 2 +- .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c | 5 +- .../staging/lustre/lnet/klnds/socklnd/socklnd.h| 2 +- .../lustre/lnet/libcfs/linux/linux-crypto.c| 4 +- drivers/staging/lustre/lustre/include/cl_object.h | 2 +- drivers/staging/lustre/lustre/ldlm/ldlm_extent.c | 4 +- drivers/staging/lustre/lustre/ldlm/ldlm_flock.c| 4 +- drivers/staging/lustre/lustre/ldlm/ldlm_internal.h | 17 +- drivers/staging/lustre/lustre/ldlm/ldlm_lib.c | 8 +- drivers/staging/lustre/lustre/ldlm/ldlm_lock.c | 26 +- drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c| 21 +- drivers/staging/lustre/lustre/ldlm/ldlm_pool.c | 4 +- drivers/staging/lustre/lustre/ldlm/ldlm_request.c | 10 +- drivers/staging/lustre/lustre/ldlm/ldlm_resource.c | 5 +- drivers/staging/lustre/lustre/llite/llite_lib.c| 4 +- drivers/staging/lustre/lustre/llite/rw.c | 4 +- drivers/staging/lustre/lustre/llite/statahead.c| 3 +- drivers/staging/lustre/lustre/llite/vvp_page.c | 4 +- drivers/staging/lustre/lustre/lov/lov_obd.c| 4 +- drivers/staging/lustre/lustre/mdc/mdc_locks.c | 3 +- drivers/staging/lustre/lustre/obdclass/obd_mount.c | 2 +- drivers/staging/lustre/lustre/osc/osc_cache.c | 4 +- drivers/staging/lustre/lustre/ptlrpc/niobuf.c | 3 +- .../staging/lustre/lustre/ptlrpc/pack_generic.c| 5 +- drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c| 5 +- drivers/staging/lustre/lustre/ptlrpc/sec_plain.c | 18 +- drivers/staging/lustre/lustre/ptlrpc/service.c | 22 +- drivers/staging/lustre/lustre/ptlrpc/wiretest.c| 288 ++--- 30 files changed, 255 insertions(+), 244 deletions(-) diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs.h b/drivers/staging/lustre/include/linux/libcfs/libcfs.h index 3f6447c..3b92d38 100644 --- a/drivers/staging/lustre/include/linux/libcfs/libcfs.h +++ b/drivers/staging/lustre/include/linux/libcfs/libcfs.h @@ -138,8 +138,8 @@ struct lnet_debugfs_symlink_def { void lustre_insert_debugfs(struct ctl_table *table, const struct lnet_debugfs_symlink_def *symlinks); int lprocfs_call_handler(void *data, int write, loff_t *ppos, - void __user *buffer, size_t *lenp, - int (*handler)(void *data, int write, - loff_t pos, void __user *buffer, int len)); +void __user *buffer, size_t *lenp, +int (*handler)(void *data, int write, loff_t pos, + void __user *buffer, int len)); #endif /* _LIBCFS_H */ diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h b/drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h index 25adab1..b7bd6e8 100644 --- a/drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h +++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h @@ -247,19 +247,19 @@ do { \ #define LCONSOLE_EMERG(format, ...) CDEBUG(D_CONSOLE | D_EMERG, format, ## __VA_ARGS__) int libcfs_debug_msg(struct libcfs_debug_msg_data *msgdata, - const char *format1, ...) +const char *format1, ...) __printf(2, 3); int libcfs_debug_vmsg2(struct libcfs_debug_msg_data *msgdata, - const char *format1, - va_list args, const char *format2, ...) + const char *format1, + va_list args, const char *format2, ...) __printf(4, 5); /* other external symbols that tracefile provides: */ int cfs_trace_copyin_string(char *knl_buffer, int knl_buffer_nob, - const char __user *usr_buffer, int usr_buffer_nob); + const char __user *usr_buffer, int usr_buffer_nob); int cfs_trace_copyout_string(char __user *usr_buffer, int usr_buffer_nob, - const char *knl_buffer, char *append); +const char *knl_buffer, char *append); #define LIBCFS_DEBUG_FILE_PATH_DEFAULT "/tmp/lustre-log" diff --git a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c index 4f5978b..e93dbeb 100644 --- a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c +++ b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c @@ -618,7 +618,7 @@ static int kiblnd_get_completion_vector(struct kib_conn *conn, int cpt) } struct kib_conn *kiblnd_create_conn(struct kib_peer *peer, struct rdma_cm_id *cmid, -
[PATCH 1/3] staging/lustre: Add spaces preferred around that '{+, -, *, /, |, <<
This patch fixes all checkpatch occurences of "CHECK: spaces preferred around that '{+,-,*,/,|,<<,>>,&}' (ctx:VxV)" in Lustre code. Signed-off-by: Emoly Liu Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/include/lu_object.h | 3 ++- .../lustre/lustre/include/lustre/lustre_idl.h | 28 +++--- .../lustre/lustre/include/lustre/lustre_user.h | 2 +- drivers/staging/lustre/lustre/include/lustre_fid.h | 2 +- .../staging/lustre/lustre/include/lustre_lite.h| 2 +- .../staging/lustre/lustre/include/obd_support.h| 13 +- drivers/staging/lustre/lustre/ldlm/ldlm_request.c | 4 ++-- drivers/staging/lustre/lustre/llite/file.c | 4 ++-- drivers/staging/lustre/lustre/llite/llite_lib.c| 21 +--- drivers/staging/lustre/lustre/llite/llite_mmap.c | 4 ++-- drivers/staging/lustre/lustre/llite/lproc_llite.c | 14 +-- drivers/staging/lustre/lustre/llite/namei.c| 4 ++-- drivers/staging/lustre/lustre/llite/rw.c | 5 ++-- drivers/staging/lustre/lustre/llite/rw26.c | 2 +- drivers/staging/lustre/lustre/llite/super25.c | 4 ++-- drivers/staging/lustre/lustre/llite/vvp_object.c | 2 +- drivers/staging/lustre/lustre/lov/lov_ea.c | 3 ++- drivers/staging/lustre/lustre/lov/lov_obd.c| 14 ++- drivers/staging/lustre/lustre/lov/lov_pool.c | 2 +- drivers/staging/lustre/lustre/mdc/mdc_locks.c | 2 +- drivers/staging/lustre/lustre/mdc/mdc_reint.c | 5 ++-- drivers/staging/lustre/lustre/obdclass/debug.c | 4 ++-- drivers/staging/lustre/lustre/obdclass/genops.c| 2 +- .../staging/lustre/lustre/obdclass/obd_config.c| 12 +- drivers/staging/lustre/lustre/obdclass/obd_mount.c | 6 ++--- drivers/staging/lustre/lustre/obdclass/obdo.c | 6 +++-- .../staging/lustre/lustre/obdecho/echo_internal.h | 4 ++-- drivers/staging/lustre/lustre/osc/osc_cache.c | 2 +- .../staging/lustre/lustre/osc/osc_cl_internal.h| 2 +- drivers/staging/lustre/lustre/osc/osc_io.c | 2 +- drivers/staging/lustre/lustre/osc/osc_request.c| 12 ++ drivers/staging/lustre/lustre/ptlrpc/import.c | 6 +++-- .../staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c| 2 +- drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c | 4 ++-- drivers/staging/lustre/lustre/ptlrpc/service.c | 2 +- 35 files changed, 111 insertions(+), 95 deletions(-) diff --git a/drivers/staging/lustre/lustre/include/lu_object.h b/drivers/staging/lustre/lustre/include/lu_object.h index 6ab1782..502bc41 100644 --- a/drivers/staging/lustre/lustre/include/lu_object.h +++ b/drivers/staging/lustre/lustre/include/lu_object.h @@ -1024,7 +1024,8 @@ enum lu_context_tag { /** * Contexts usable in cache shrinker thread. */ - LCT_SHRINKER = LCT_MD_THREAD|LCT_DT_THREAD|LCT_CL_THREAD|LCT_NOREF + LCT_SHRINKER = LCT_MD_THREAD | LCT_DT_THREAD | LCT_CL_THREAD | + LCT_NOREF }; /** diff --git a/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h b/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h index 35af07e..3a0feac 100644 --- a/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h +++ b/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h @@ -2019,7 +2019,7 @@ void lustre_swab_generic_32s(__u32 *val); #define MDS_INODELOCK_MAXSHIFT 5 /* This FULL lock is useful to take on unlink sort of operations */ -#define MDS_INODELOCK_FULL ((1<<(MDS_INODELOCK_MAXSHIFT+1))-1) +#define MDS_INODELOCK_FULL ((1 << (MDS_INODELOCK_MAXSHIFT + 1)) - 1) /* NOTE: until Lustre 1.8.7/2.1.1 the fid_ver() was packed into name[2], * but was moved into name[1] along with the OID to avoid consuming the @@ -3193,8 +3193,8 @@ struct llog_log_hdr { __u32 llh_cat_idx; /* for a catalog the first plain slot is next to it */ struct obd_uuid llh_tgtuuid; - __u32 llh_reserved[LLOG_HEADER_SIZE/sizeof(__u32) - 23]; - __u32 llh_bitmap[LLOG_BITMAP_BYTES/sizeof(__u32)]; + __u32 llh_reserved[LLOG_HEADER_SIZE / sizeof(__u32) - 23]; + __u32 llh_bitmap[LLOG_BITMAP_BYTES / sizeof(__u32)]; struct llog_rec_tailllh_tail; } __packed; @@ -3409,17 +3409,17 @@ void lustre_swab_lustre_capa(struct lustre_capa *c); /** lustre_capa::lc_opc */ enum { - CAPA_OPC_BODY_WRITE = 1<<0, /**< write object data */ - CAPA_OPC_BODY_READ= 1<<1, /**< read object data */ - CAPA_OPC_INDEX_LOOKUP = 1<<2, /**< lookup object fid */ - CAPA_OPC_INDEX_INSERT = 1<<3, /**< insert object fid */ - CAPA_OPC_INDEX_DELETE = 1<<4, /**< delete object fid */ - CAPA_OPC_OSS_WRITE= 1<<5, /**< write oss object data */ - CAPA_OPC_OSS_READ = 1<<6, /**< read oss object data */ - CAPA_OPC_OSS_TRUNC= 1<<7, /**< truncate oss object */ - CAPA_OPC_OSS_DESTROY = 1<<8, /**<
Re: [PATCH 1/2] staging: dgnc: change a parameter from tty_struct to
2016-08-22 0:55 GMT+09:00 Greg KH : > On Fri, Aug 19, 2016 at 10:04:52AM +0900, Daeseok Youn wrote: >> The dgnc_maxcps_room() function must be called only for print device. >> The if-statement for checking print device checks before calling >> maxcps_room() and also this function doesn't need to have any >> data except channel_t. >> >> Signed-off-by: Daeseok Youn >> --- >> drivers/staging/dgnc/dgnc_tty.c | 18 +- >> 1 file changed, 5 insertions(+), 13 deletions(-) > > Your subject line doesn't make much sense, does it? I will update it and resend. Thanks. Regards, Daeseok Youn. > > :( > > Please fix up and resend. > > thanks, > > greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH V2] staging: dgnc: check the type of print before calling
The dgnc_maxcps_room() function must be called only for print device. The if-statement for checking print device checks before calling dgnc_maxcps_room() and also this function doesn't need to have any data except channel_t. Signed-off-by: Daeseok Youn --- V2: update subject line from "change a parameter from tty_struct to channel_t" to "check the type of print before calling dgnc_maxcps_room()" drivers/staging/dgnc/dgnc_tty.c | 18 +- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/drivers/staging/dgnc/dgnc_tty.c b/drivers/staging/dgnc/dgnc_tty.c index e4c6c3f..31b18e6 100644 --- a/drivers/staging/dgnc/dgnc_tty.c +++ b/drivers/staging/dgnc/dgnc_tty.c @@ -1492,18 +1492,8 @@ static int dgnc_tty_chars_in_buffer(struct tty_struct *tty) * returns the new bytes_available. This only affects printer * output. */ -static int dgnc_maxcps_room(struct tty_struct *tty, int bytes_available) +static int dgnc_maxcps_room(struct channel_t *ch, int bytes_available) { - struct un_t *un = tty->driver_data; - struct channel_t *ch = un->un_ch; - - /* -* If its not the Transparent print device, return -* the full data amount. -*/ - if (un->un_type != DGNC_PRINT) - return bytes_available; - if (ch->ch_digi.digi_maxcps > 0 && ch->ch_digi.digi_bufsize > 0) { int cps_limit = 0; unsigned long current_time = jiffies; @@ -1567,7 +1557,8 @@ static int dgnc_tty_write_room(struct tty_struct *tty) ret += WQUEUESIZE; /* Limit printer to maxcps */ - ret = dgnc_maxcps_room(tty, ret); + if (un->un_type != DGNC_PRINT) + ret = dgnc_maxcps_room(ch, ret); /* * If we are printer device, leave space for @@ -1659,7 +1650,8 @@ static int dgnc_tty_write(struct tty_struct *tty, * Limit printer output to maxcps overall, with bursts allowed * up to bufsize characters. */ - bufcount = dgnc_maxcps_room(tty, bufcount); + if (un->un_type != DGNC_PRINT) + bufcount = dgnc_maxcps_room(ch, bufcount); /* * Take minimum of what the user wants to send, and the -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
RE: [PATCH 3/3] drivers: Add visorbus to the drivers/virt directory
> -Original Message- > From: Greg KH [mailto:gre...@linuxfoundation.org] > Sent: Sunday, August 21, 2016 2:05 PM > To: Kershner, David A > Cc: cor...@lwn.net; t...@linutronix.de; mi...@redhat.com; > h...@zytor.com; Arfvidson, Erik ; Sell, Timothy > C ; hof...@osadl.org; dzic...@redhat.com; > jes.soren...@redhat.com; Curtin, Alexander Paul > ; janani.rvchn...@gmail.com; > sudipm.mukher...@gmail.com; pra...@redhat.com; Binder, David Anthony > ; nhor...@redhat.com; > dan.j.willi...@intel.com; linux-ker...@vger.kernel.org; linux- > d...@vger.kernel.org; driverdev-devel@linuxdriverproject.org; *S-Par- > Maintainer > Subject: Re: [PATCH 3/3] drivers: Add visorbus to the drivers/virt directory > > On Fri, Jun 10, 2016 at 11:23:56PM -0400, David Kershner wrote: > > visorbus is currently located at drivers/staging/visorbus, > > this patch moves it to drivers/virt. > > > > Signed-off-by: David Kershner > > Reviewed-by: Tim Sell > > --- > > drivers/staging/unisys/Kconfig| 3 > > +-- > > drivers/staging/unisys/Makefile | 1 - > > drivers/virt/Kconfig | 2 > > ++ > > drivers/virt/Makefile | 1 + > > drivers/{staging/unisys => virt}/visorbus/Kconfig | 0 > > drivers/{staging/unisys => virt}/visorbus/Makefile| 0 > > drivers/{staging/unisys => virt}/visorbus/controlvmchannel.h | 0 > > drivers/{staging/unisys => virt}/visorbus/controlvmcompletionstatus.h | 0 > > drivers/{staging/unisys => virt}/visorbus/iovmcall_gnuc.h | 0 > > drivers/{staging/unisys => virt}/visorbus/vbuschannel.h | 0 > > drivers/{staging/unisys => virt}/visorbus/vbusdeviceinfo.h| 0 > > drivers/{staging/unisys => virt}/visorbus/vbushelper.h| 0 > > drivers/{staging/unisys => virt}/visorbus/visorbus_main.c | 0 > > drivers/{staging/unisys => virt}/visorbus/visorbus_private.h | 0 > > drivers/{staging/unisys => virt}/visorbus/visorchannel.c | 0 > > drivers/{staging/unisys => virt}/visorbus/visorchipset.c | 0 > > I picked one random file here, this last one, and found a number of > "odd" things in it. > > So, given that I can't really comment on the patch itself, I'm going to > include the file below, quote it, and then provide some comments, ok? > > /* visorchipset_main.c > > ... > > static void > > controlvm_init_response(struct controlvm_message *msg, > > struct controlvm_message_header *msg_hdr, int response) > > { > > memset(msg, 0, sizeof(struct controlvm_message)); > > memcpy(&msg->hdr, msg_hdr, sizeof(struct controlvm_message_header)); > > msg->hdr.payload_bytes = 0; > > msg->hdr.payload_vm_offset = 0; > > msg->hdr.payload_max_bytes = 0; > > if (response < 0) { > > msg->hdr.flags.failed = 1; > > msg->hdr.completion_status = (u32)(-response); > > } > > } > > > > static void > > Billy(struct controlvm_message_header *msg_hdr, int response) > > Not John? Bob? Sally? Alice? Bernise? Jean? Molly? Huh? What version of source code are you looking at?? The file being moved by this patch should be drivers/staging/unisys/visorbus/visorchipset.c in your staging-next branch (https://git.kernel.org/cgit/linux/kernel/git/gregkh/staging.git/tree/drivers/staging/unisys/visorbus/visorchipset.c?h=staging-next). If you look there, you will NOT find "Billy()", but instead "controlvm_respond()", i.e.: static void controlvm_init_response(struct controlvm_message *msg, struct controlvm_message_header *msg_hdr, int response) { memset(msg, 0, sizeof(struct controlvm_message)); memcpy(&msg->hdr, msg_hdr, sizeof(struct controlvm_message_header)); msg->hdr.payload_bytes = 0; msg->hdr.payload_vm_offset = 0; msg->hdr.payload_max_bytes = 0; if (response < 0) { msg->hdr.flags.failed = 1; msg->hdr.completion_status = (u32)(-response); } } static void controlvm_respond(struct controlvm_message_header *msg_hdr, int response) { struct controlvm_message outmsg; controlvm_init_response(&outmsg, msg_hdr, response); if (outmsg.hdr.flags.test_message == 1) return; if (!visorchannel_signalinsert(controlvm_channel, CONTROLVM_QUEUE_REQUEST, &outmsg)) { return; } } One (or both) of us is confused. Tim Sell ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] rtl8712: pwrctrl_priv: Replace semaphore lock with mutex
The semaphore 'lock' in 'pwrctrl_priv' is used as a simple mutex, so it should be written as one. Semaphores are going away in the future. _enter_pwrlock was using down_interruptible(), so the lock could be broken by sending a signal. This could be a bug, because nothing checks the return code here. Hence, using mutex_lock instead of the interruptible version. Removing the now unused _enter_pwrlock and _down_sema. Signed-off-by: Binoy Jayan Reviewed-by: Arnd Bergmann Tested-by: Larry Finger --- drivers/staging/rtl8712/osdep_service.h | 7 --- drivers/staging/rtl8712/rtl8712_cmd.c | 10 +- drivers/staging/rtl8712/rtl871x_pwrctrl.c | 22 +++--- drivers/staging/rtl8712/rtl871x_pwrctrl.h | 7 +-- 4 files changed, 17 insertions(+), 29 deletions(-) diff --git a/drivers/staging/rtl8712/osdep_service.h b/drivers/staging/rtl8712/osdep_service.h index ad041c9..c9ea50d 100644 --- a/drivers/staging/rtl8712/osdep_service.h +++ b/drivers/staging/rtl8712/osdep_service.h @@ -57,13 +57,6 @@ struct __queue { spin_lock_init(&((pqueue)->lock)); \ } while (0) -static inline u32 _down_sema(struct semaphore *sema) -{ - if (down_interruptible(sema)) - return _FAIL; - return _SUCCESS; -} - static inline u32 end_of_queue_search(struct list_head *head, struct list_head *plist) { diff --git a/drivers/staging/rtl8712/rtl8712_cmd.c b/drivers/staging/rtl8712/rtl8712_cmd.c index 3877fcf..9f61583 100644 --- a/drivers/staging/rtl8712/rtl8712_cmd.c +++ b/drivers/staging/rtl8712/rtl8712_cmd.c @@ -264,9 +264,9 @@ static struct cmd_obj *cmd_hdl_filter(struct _adapter *padapter, */ if (padapter->pwrctrlpriv.pwr_mode > PS_MODE_ACTIVE) { padapter->pwrctrlpriv.pwr_mode = PS_MODE_ACTIVE; - _enter_pwrlock(&(padapter->pwrctrlpriv.lock)); + mutex_lock(&padapter->pwrctrlpriv.mutex_lock); r8712_set_rpwm(padapter, PS_STATE_S4); - up(&(padapter->pwrctrlpriv.lock)); + mutex_unlock(&padapter->pwrctrlpriv.mutex_lock); } pcmd_r = pcmd; break; @@ -395,10 +395,10 @@ _next: } if (pcmd->cmdcode == GEN_CMD_CODE(_SetPwrMode)) { if (padapter->pwrctrlpriv.bSleep) { - _enter_pwrlock(&(padapter-> - pwrctrlpriv.lock)); + mutex_lock(&padapter-> + pwrctrlpriv.mutex_lock); r8712_set_rpwm(padapter, PS_STATE_S2); - up(&padapter->pwrctrlpriv.lock); + mutex_unlock(&padapter->pwrctrlpriv.mutex_lock); } } r8712_free_cmd_obj(pcmd); diff --git a/drivers/staging/rtl8712/rtl871x_pwrctrl.c b/drivers/staging/rtl8712/rtl871x_pwrctrl.c index 98a5e74..8d7ead6 100644 --- a/drivers/staging/rtl8712/rtl871x_pwrctrl.c +++ b/drivers/staging/rtl8712/rtl871x_pwrctrl.c @@ -103,14 +103,14 @@ void r8712_cpwm_int_hdl(struct _adapter *padapter, if (pwrpriv->cpwm_tog == ((preportpwrstate->state) & 0x80)) return; del_timer(&padapter->pwrctrlpriv.rpwm_check_timer); - _enter_pwrlock(&pwrpriv->lock); + mutex_lock(&pwrpriv->mutex_lock); pwrpriv->cpwm = (preportpwrstate->state) & 0xf; if (pwrpriv->cpwm >= PS_STATE_S2) { if (pwrpriv->alives & CMD_ALIVE) complete(&(pcmdpriv->cmd_queue_comp)); } pwrpriv->cpwm_tog = (preportpwrstate->state) & 0x80; - up(&pwrpriv->lock); + mutex_unlock(&pwrpriv->mutex_lock); } static inline void register_task_alive(struct pwrctrl_priv *pwrctrl, uint tag) @@ -141,10 +141,10 @@ static void SetPSModeWorkItemCallback(struct work_struct *work) struct _adapter *padapter = container_of(pwrpriv, struct _adapter, pwrctrlpriv); if (!pwrpriv->bSleep) { - _enter_pwrlock(&pwrpriv->lock); + mutex_lock(&pwrpriv->mutex_lock); if (pwrpriv->pwr_mode == PS_MODE_ACTIVE) r8712_set_rpwm(padapter, PS_STATE_S4); - up(&pwrpriv->lock); + mutex_lock(&pwrpriv->mutex_lock); } } @@ -155,11 +155,11 @@ static void rpwm_workitem_callback(struct work_struct *work) struct _adapter *padapter = container_of(pwrpriv, struct _adapter, pwrctrlpriv); if (pwrpriv->cpwm != pwrpriv->rpwm) { - _enter_pwrlock(&pwrpriv->lock); + mutex_lock(&pwrpriv->mutex_lock);