Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1501488
| From | Greg KH <gregkh@linuxfoundation.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] Staging: dgnc: Clean up Macros |
| Date | 2016-10-16 17:40 +0200 |
| Message-ID | <ssVHA-7AY-13@gated-at.bofh.it> (permalink) |
| References | <ssT33-5UW-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Sun, Oct 16, 2016 at 06:12:32PM +0530, Siddhi Dave wrote:
> Fix checkpatch warning: Macros with flow control statements should be avoided
>
> Because Macros with flow control statements (goto and return) are
> not very nice to read as any flow movement is unexpected.
>
> Signed-off-by: Siddhi Dave <d.sandy5990@gmail.com>
> ---
> drivers/staging/dgnc/dgnc_sysfs.c | 20 ++++++++++----------
> 1 file changed, 10 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/staging/dgnc/dgnc_sysfs.c b/drivers/staging/dgnc/dgnc_sysfs.c
> index 290bf6e..0767740 100644
> --- a/drivers/staging/dgnc/dgnc_sysfs.c
> +++ b/drivers/staging/dgnc/dgnc_sysfs.c
> @@ -90,16 +90,16 @@ void dgnc_remove_driver_sysfiles(struct pci_driver *dgnc_driver)
> driver_remove_file(driverfs, &driver_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; \
> +#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 ssize_t vpd_show(struct device *p, struct device_attribute *attr,
You didn't test-build this code, why not?
Also, please see the archives for why this type of change is not going
to be correct and I can't take it.
And finally, you sent 3 copies of this, why?
thanks,
greg k-h
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] Staging: dgnc: Clean up Macros Siddhi Dave <d.sandy5990@gmail.com> - 2016-10-16 14:50 +0200 Re: [Outreachy kernel] [PATCH] Staging: dgnc: Clean up Macros Julia Lawall <julia.lawall@lip6.fr> - 2016-10-16 15:40 +0200 Re: [PATCH] Staging: dgnc: Clean up Macros Greg KH <gregkh@linuxfoundation.org> - 2016-10-16 17:40 +0200
csiph-web