lkml.org 
[lkml]   [2021]   [Nov]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v5] vt: keyboard: suppress warnings in vt_do_kdgkb_ioctl
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

\
 
 \ /
  Last update: 2021-11-08 15:40    [W:0.134 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site