Re: [PATCH] staging: dgnc: replace DGNC_VERIFY_BOARD macro
On Mon, Oct 17, 2016 at 10:29 AM, Greg KHwrote: > On Fri, Oct 14, 2016 at 07:22:57PM +0200, Fernando Apesteguia wrote: >> The patch replaces the macro with a function (dgnc_get_board) and >> substitutes the macro statement with a call to that function and a >> comparison on the returned value. >> >> This removes a checkpatch warning. >> >> Signed-off-by: Fernando Apesteguia >> --- >> drivers/staging/dgnc/dgnc_sysfs.c | 74 >> +++ >> 1 file changed, 51 insertions(+), 23 deletions(-) >> >> diff --git a/drivers/staging/dgnc/dgnc_sysfs.c >> b/drivers/staging/dgnc/dgnc_sysfs.c >> index 290bf6e..3ea23a9 100644 >> --- a/drivers/staging/dgnc/dgnc_sysfs.c >> +++ b/drivers/staging/dgnc/dgnc_sysfs.c >> @@ -90,17 +90,21 @@ void dgnc_remove_driver_sysfiles(struct pci_driver >> *dgnc_driver) >> driver_remove_file(driverfs, _attr_pollrate); >> } >> >> -#define DGNC_VERIFY_BOARD(p, bd) \ >> - do {\ >> - if (!p) \ >> - return 0; \ >> - \ >> - bd = dev_get_drvdata(p);\ >> - if (!bd || bd->magic != DGNC_BOARD_MAGIC) \ >> - return 0; \ >> - if (bd->state != BOARD_READY) \ >> - return 0; \ >> - } while (0) >> +static struct dgnc_board *dgnc_get_board(struct device *p) >> +{ >> + struct dgnc_board *bd; >> + >> + if (!p) >> + return NULL; >> + >> + bd = dev_get_drvdata(p); >> + if (!bd || bd->magic != DGNC_BOARD_MAGIC) >> + return NULL; >> + if (bd->state != BOARD_READY) >> + return NULL; >> + >> + return bd; >> +} > > No, this macro should be removed entirely as what it does is pointless > in some parts, wrong in others, and not needed at all in the rest :( > > I've asked others to fix this up properly in the past, but it doesn't > seem like anyone wants to do the work... > I tried to find the discussion the relevant mails in lkml.org but couldn't find them. Could you point me to them so I can have a look? Thanks. > I don't want to take this patch as it will hide the real issues here. > > thanks, > > greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] Staging: rtl8192u: Staticfy debug method.
El 31/07/2014 10:21, Dan Carpenter dan.carpen...@oracle.com escribió: You need to compile these things before sending them... This adds a GCC warning about uncalled functions. Sorry, but I did compile it with make C=1 M=drivers/staging But for the function to be called, DEBUG_EPROM must be defined and I had it defined. That's why I overlooked the warning. Apologies. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: vt6655: Fix device table definition.
On Wed, Jul 30, 2014 at 1:43 PM, Tobias Klauser tklau...@distanz.ch wrote: On 2014-07-29 at 19:44:24 +0200, fernando.apesteg...@gmail.com fernando.apesteg...@gmail.com wrote: From: Fernando Apesteguia fernando.apesteg...@gmail.com Add static to the definition of the pci device table. Signed-off-by: Fernando Apesteguia fernando.apesteg...@gmail.com This change is already part of Greg's tree, see commit 9e4c5c2837a4 (staging: vt6655: statify some variables) in branch staging-next. Please make sure you work against that branch (which is also a part of linux-next) for any patches you submit. Ooops. I will. Thanks for the hint! Cheers Tobias ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] Staging: vt6655: staticfy variable
On Wed, Jul 30, 2014 at 9:16 PM, Guillaume Clement gclem...@baobob.org wrote: Hello, Add static to variable. Signed-off-by: Fernando Apesteguia fernando.apesteg...@gmail.com --- drivers/staging/vt6655/ioctl.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/vt6655/ioctl.c b/drivers/staging/vt6655/ioctl.c index 65e5933..cc6e47b 100644 --- a/drivers/staging/vt6655/ioctl.c +++ b/drivers/staging/vt6655/ioctl.c @@ -41,7 +41,7 @@ static int msglevel = MSG_LEVEL_INFO; #ifdef WPA_SM_Transtatus -SWPAResult wpa_Result; +static SWPAResult wpa_Result; #endif This changes breaks the compilation (actually the linking). wpa_Result is actually used in device_main.c in device_open with the following: Argh... sorry, I missed that. #ifdef WPA_SM_Transtatus extern SWPAResult wpa_Result; #endif ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel