From: Dan Carpenter <dan.carpenter@oracle.com>
To: Sanidhya Solanki <jpage.lkml@gmail.com>
Cc: lidza.louina@gmail.com, markh@compro.net,
gregkh@linuxfoundation.org,
driverdev-devel@linuxdriverproject.org,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: dgnc: Patch includes the checkpatch fixes
Date: Fri, 11 Dec 2015 16:02:33 +0300 [thread overview]
Message-ID: <20151211130233.GJ5284@mwanda> (raw)
In-Reply-To: <20151211032149.489d90d1@gmail.com>
On Fri, Dec 11, 2015 at 03:21:49AM -0500, Sanidhya Solanki wrote:
> >From 1dbe78ce98037da5467d817a9db838d678b338ae Mon Sep 17 00:00:00 2001
> From: Sanidhya Solanki <jpage.lkml@gmail.com>
> Date: Fri, 11 Dec 2015 03:08:53 -0500
> Subject: [PATCH] staging: dgnc: Patch includes the checkpatch fixes
Don't include this stuff.
>
> Patch contains the checkpatch fixes as asked by the TODO.
> TODO file is updated as well.
Fix one type of warning at a time. This will be a series of patches.
>
> Signed-off-by: Sanidhya Solanki <jpage.lkml@gmail.com>
> @@ -110,7 +98,16 @@ static ssize_t dgnc_vpd_show(struct device *p, struct device_attribute *attr,
> int count = 0;
> int i = 0;
>
> - 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);
Google about why do while(0) loops are used in macros and then redo
this. Mostly the patch isn't bad, but I suspect I'm going to complain
about how you split up some of the long lines.
regards,
dan carpenter
next prev parent reply other threads:[~2015-12-11 13:02 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-11 8:21 [PATCH] staging: dgnc: Patch includes the checkpatch fixes Sanidhya Solanki
2015-12-11 13:02 ` Dan Carpenter [this message]
2015-12-11 10:10 ` Sanidhya Solanki
2015-12-11 14:18 ` Dan Carpenter
2015-12-12 2:15 ` [PATCH] staging: dgnc: Update the TODO file Sanidhya Solanki
2015-12-12 2:24 ` [PATCH] staging: dgnc: Patch includes the checkpatch fixes Sanidhya Solanki
2015-12-12 8:57 ` Dan Carpenter
2015-12-12 7:58 ` [PATCH] [PATCH 1/3] " Sanidhya Solanki
2015-12-14 19:14 ` Greg KH
2015-12-15 0:01 ` Sanidhya Solanki
2015-12-15 0:02 ` Sanidhya Solanki
2015-12-15 0:03 ` Sanidhya Solanki
2015-12-15 4:34 ` Greg KH
2015-12-15 0:45 ` Sanidhya Solanki
2015-12-15 5:21 ` Greg KH
2015-12-15 1:22 ` [PATCH FIXED " Sanidhya Solanki
2015-12-15 5:46 ` Greg KH
2015-12-15 1:56 ` [PATCH FIXED 1/3] staging: dgnc: Patch includes spacing fixes Sanidhya Solanki
2015-12-15 2:00 ` [PATCH 2/3] staging: dgnc: Patch includes CamelCase & Macro fixes Sanidhya Solanki
2015-12-15 1:58 ` [PATCH 1/3] staging: dgnc: Patch includes the checkpatch fixes Sanidhya Solanki
2015-12-15 6:37 ` Amitoj Kaur Chawla
2015-12-15 6:38 ` Greg KH
2015-12-15 2:01 ` [PATCH 3/3] staging: dgnc: Patch updates the TODO file Sanidhya Solanki
2015-12-15 1:24 ` [PATCH FIXED 2/3] staging: dgnc: Patch for CamelCase fixes Sanidhya Solanki
2015-12-15 1:25 ` [PATCH FIXED 3/3] staging: dgnc: Patch updates the TODO file Sanidhya Solanki
2015-12-12 8:00 ` [PATCH 2/3] staging: dgnc: Patch includes the checkpatch fixes Sanidhya Solanki
2015-12-12 8:03 ` [PATCH 3/3] " Sanidhya Solanki
2015-12-12 8:09 ` [PATCH] " Sanidhya Solanki
2015-12-12 10:08 ` Sudip Mukherjee
2015-12-12 6:12 ` Sanidhya Solanki
2015-12-12 10:26 ` Sudip Mukherjee
[not found] ` <20151211210443.48f43b77@gmail.com>
2015-12-12 2:11 ` [PATCH: FIXED} " Sanidhya Solanki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151211130233.GJ5284@mwanda \
--to=dan.carpenter@oracle.com \
--cc=devel@driverdev.osuosl.org \
--cc=driverdev-devel@linuxdriverproject.org \
--cc=gregkh@linuxfoundation.org \
--cc=jpage.lkml@gmail.com \
--cc=lidza.louina@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=markh@compro.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).