From: Jeff Garzik <jgarzik@pobox.com>
To: Dan Noe <dpn@isomerica.net>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] cxgb3: Fix __must_check warning with dev_dbg.
Date: Wed, 16 Apr 2008 20:54:18 -0400 [thread overview]
Message-ID: <48069FBA.3040004@pobox.com> (raw)
In-Reply-To: <12080540782177-git-send-email-dpn@isomerica.net>
Dan Noe wrote:
> Fix the warning:
> drivers/net/cxgb3/cxgb3_main.c: In function ‘offload_open’:
> drivers/net/cxgb3/cxgb3_main.c:936: warning: ignoring return value of
> ‘sysfs_create_group’, declared with attribute warn_unused_result
>
> Now the return value is checked; if sysfs_create_group() returns failure,
> a warning is printed using dev_dbg, and the code continues as before. Use
> of dev_dbg ensures printk is not needlessly included unless desired for
> debugging.
>
> Signed-off-by: Dan Noe <dpn@isomerica.net>
> ---
> drivers/net/cxgb3/cxgb3_main.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/cxgb3/cxgb3_main.c b/drivers/net/cxgb3/cxgb3_main.c
> index fd2e05b..05e5f59 100644
> --- a/drivers/net/cxgb3/cxgb3_main.c
> +++ b/drivers/net/cxgb3/cxgb3_main.c
> @@ -1014,8 +1014,8 @@ static int offload_open(struct net_device *dev)
> adapter->port[0]->mtu : 0xffff);
> init_smt(adapter);
>
> - /* Never mind if the next step fails */
> - sysfs_create_group(&tdev->lldev->dev.kobj, &offload_attr_group);
> + if (sysfs_create_group(&tdev->lldev->dev.kobj, &offload_attr_group))
> + dev_dbg(&dev->dev, "cannot create sysfs group\n");
>
applied
next prev parent reply other threads:[~2008-04-17 0:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-13 2:34 [PATCH] cxgb3: Fix __must_check warning with dev_dbg Dan Noe
2008-04-17 0:54 ` Jeff Garzik [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-04-02 11:50 Dan Noe
2008-04-02 15:49 ` Chris Snook
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=48069FBA.3040004@pobox.com \
--to=jgarzik@pobox.com \
--cc=dpn@isomerica.net \
--cc=netdev@vger.kernel.org \
/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).