From: David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
To: mankad.maulik-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Cc: ming.lei-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org,
gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org,
oneukum-l3A5Bk7waGM@public.gmane.org,
netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH v4 3/5] usbnet: smsc95xx: fix memory leak in smsc95xx_suspend
Date: Fri, 09 Nov 2012 02:25:20 -0500 (EST) [thread overview]
Message-ID: <20121109.022520.1078854628056136345.davem@davemloft.net> (raw)
In-Reply-To: <CAEtNAxntrPne0AxqR2Pn-Vrrv_R12U-CxmW6=mFSfUS6U3BMKg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
From: Maulik Mankad <mankad.maulik-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Date: Fri, 9 Nov 2012 12:28:17 +0530
> We don't need memset() here.
> May be command[2] = {0}; offset[2] = {0}; crc[4] = {0}; is enough.
The compiler can see this an will eliminate the unnecessary
clears.
So it's better to use memset and make the code much clearer
and easier to audit.
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2012-11-09 7:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-06 14:53 [PATCH v4 0/5] usbnet: avoiding access auto-suspended device Ming Lei
[not found] ` <1352213588-8948-1-git-send-email-ming.lei-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
2012-11-06 14:53 ` [PATCH v4 1/5] usbnet: introduce usbnet_{read|write}_cmd_nopm Ming Lei
2012-11-06 14:53 ` [PATCH v4 3/5] usbnet: smsc95xx: fix memory leak in smsc95xx_suspend Ming Lei
[not found] ` <CAEtNAxntrPne0AxqR2Pn-Vrrv_R12U-CxmW6=mFSfUS6U3BMKg@mail.gmail.com>
[not found] ` <CAEtNAxntrPne0AxqR2Pn-Vrrv_R12U-CxmW6=mFSfUS6U3BMKg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-11-09 7:25 ` David Miller [this message]
2012-11-06 14:53 ` [PATCH v4 5/5] usbnet: runtime wake up device before calling usbnet_{read|write}_cmd Ming Lei
2012-11-07 8:54 ` [PATCH v4 0/5] usbnet: avoiding access auto-suspended device David Miller
2012-11-06 14:53 ` [PATCH v4 2/5] usbnet: smsc75xx: apply the introduced usbnet_{read|write}_cmd_nopm Ming Lei
2012-11-06 14:53 ` [PATCH v4 4/5] usbnet: smsc95xx: " Ming Lei
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=20121109.022520.1078854628056136345.davem@davemloft.net \
--to=davem-ft/pcqaiutieiz0/mpfg9q@public.gmane.org \
--cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
--cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mankad.maulik-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=ming.lei-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=oneukum-l3A5Bk7waGM@public.gmane.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).