From: Greg KH <gregkh@linuxfoundation.org>
To: Ajay Garg <ajaygargnsit@gmail.com>
Cc: jirislaby@kernel.org, andriy.shevchenko@linux.intel.com,
kernel@esmil.dk, linux-serial@vger.kernel.org,
linux-kernel@vger.kernel.org, paskripkin@gmail.com,
johan@kernel.org
Subject: Re: [PATCH v5] vt: keyboard: suppress warnings in vt_do_kdgkb_ioctl
Date: Mon, 8 Nov 2021 15:10:53 +0100 [thread overview]
Message-ID: <YYkv7ekV9ezpPOWx@kroah.com> (raw)
In-Reply-To: <CAHP4M8WLaWa769hDJBWVwL7P7hadoTk+CE1sVba3tRVxpMRVtw@mail.gmail.com>
On Mon, Nov 08, 2021 at 07:24:59PM +0530, Ajay Garg wrote:
> Hmm, I am afraid I don't understand. The patch changes only 5 lines.
> Could someone help me navigate what to "fix"?
>
>
> Thanks and Regards,
> Ajay
>
> On Mon, Nov 8, 2021 at 7:22 PM Greg KH <gregkh@linuxfoundation.org> wrote:
> >
> > On Mon, Nov 08, 2021 at 07:19:01PM +0530, Ajay Garg wrote:
> > > smatch-kchecker gives the following warnings when run on keyboard.c :
> > >
> > > vt_do_kdgkb_ioctl() error: uninitialized symbol 'kbs'.
> > > vt_do_kdgkb_ioctl() error: uninitialized symbol 'ret'.
> > >
> > > i)
> > > The 'kbs" warning was introduced by "07edff926520" :
> > > ("vt: keyboard, reorder user buffer handling in vt_do_kdgkb_ioctl")
> > >
> > > *
> > > prior 07edff926520, the scope of kbs (allocation/deallocation) was
> > > external to switch-cases.
> > >
> > > *
> > > post 07edff926520, kbs is allocated internally for each case, however the
> > > deallocation remains external.
> > >
> > > Thus, as the "fix", the scope of kbs deallocation is now made internal
> > > to each switch case.
> > >
> > > ii)
> > > The 'ret' warning is the result of "4e1404a5cd04" :
> > > ("vt: keyboard, extract and simplify vt_kdskbsent")
> > >
> > > where the "ret = 0" (right at the end) was accidentally removed.
> > >
> > > Bringing back the above in a slightly different way, by initializing ret
> > > to 0 at the start.
You are listing two different things being done in this single commit.
It should be 2 different patches.
I would recommend getting more comfortable with Linux kernel development
by working in the drivers/staging/ portion of the kernel first. And not
in the "core" kernel like tty/serial or other well-entrenched
subsystems. That way you can learn the proper processes and workflows
better in an area of the kernel that is specifically designed just for
that, and not end up bothering the time of other kernel developers for
basic process issues like your recent patches have shown.
thanks,
greg k-h
next prev parent reply other threads:[~2021-11-08 14:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-08 13:49 [PATCH v5] vt: keyboard: suppress warnings in vt_do_kdgkb_ioctl Ajay Garg
2021-11-08 13:52 ` Greg KH
2021-11-08 13:54 ` Ajay Garg
2021-11-08 14:10 ` Greg KH [this message]
2021-11-08 14:28 ` Ajay Garg
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=YYkv7ekV9ezpPOWx@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=ajaygargnsit@gmail.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=jirislaby@kernel.org \
--cc=johan@kernel.org \
--cc=kernel@esmil.dk \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=paskripkin@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox