Re: [PATCH v5] vt: keyboard: suppress warnings in vt_do_kdgkb_ioctl

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxxx> 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



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux