From: Greg KH <gregkh@linuxfoundation.org>
To: 慕冬亮 <mudongliangabcd@gmail.com>
Cc: davem@davemloft.net, helmut.schaa@googlemail.com,
kvalo@codeaurora.org, linux-kernel <linux-kernel@vger.kernel.org>,
linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
sgruszka@redhat.com
Subject: Re: [PATCH] rt2x00: reset reg earlier in rt2500usb_register_read
Date: Thu, 21 Jan 2021 12:21:24 +0100 [thread overview]
Message-ID: <YAljtMMV4oh5uAHC@kroah.com> (raw)
In-Reply-To: <CAD-N9QXhD48-6GbpCUYuxPKEbkzGgGTaFKQ8TAaQ93WfD_sT2A@mail.gmail.com>
On Thu, Jan 21, 2021 at 06:59:08PM +0800, 慕冬亮 wrote:
> > > rt2x00usb_vendor_request_buff(rt2x00dev, USB_MULTI_READ,
> > > USB_VENDOR_REQUEST_IN, offset,
> > > ®, sizeof(reg));
> >
> > Are you sure this is valid to call this function with a variable on the
> > stack like this? How did you test this change?
>
> First, I did not do any changes to this call. Second, the programming
> style to pass the pointer of stack variable as arguments is not really
> good. Third, I check this same code file, there are many code snippets
> with such programming style. :(
I know you did not change it, what I am asking is how did you test this
change works? I think the kernel will warn you in huge ways that using
this pointer on the stack is incorrect, which implies you did not test
this change :(
thanks,
greg k-h
next prev parent reply other threads:[~2021-01-21 11:38 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-21 9:20 [PATCH] rt2x00: reset reg earlier in rt2500usb_register_read Dongliang Mu
2021-01-21 9:49 ` Greg KH
2021-01-21 10:59 ` 慕冬亮
2021-01-21 11:20 ` Greg KH
2021-01-21 11:21 ` Greg KH [this message]
2021-01-21 11:25 ` 慕冬亮
-- strict thread matches above, loose matches on Subject: below --
2021-01-21 10:52 Dongliang Mu
2021-01-21 11:19 ` Greg KH
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=YAljtMMV4oh5uAHC@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=davem@davemloft.net \
--cc=helmut.schaa@googlemail.com \
--cc=kvalo@codeaurora.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=mudongliangabcd@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=sgruszka@redhat.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.