Re: [PATCH 5/9] staging: vc04_services: Do not pass NULL to vchiq_log_error()

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

 



On Thu, Nov 23, 2023 at 03:41:27PM +0200, Laurent Pinchart wrote:
> On Thu, Nov 23, 2023 at 12:57:14PM +0000, Greg Kroah-Hartman wrote:
> > On Tue, Nov 07, 2023 at 06:01:58PM +0530, Umang Jain wrote:
> > > Hi Laurent,
> > > 
> > > On 11/7/23 5:55 PM, Laurent Pinchart wrote:
> > > > Hi Umang,
> > > > 
> > > > Thank you for the patch.
> > > > 
> > > > On Tue, Nov 07, 2023 at 04:51:52AM -0500, Umang Jain wrote:
> > > > > vchiq_add_connected_callback() logs using vchiq_log_error() macro,
> > > > > but passes NULL instead of a struct device pointer. Fix it.
> > > > > 
> > > > > vchiq_add_connected_callback() is not used anywhere in the vc04_services
> > > > > as of now. It will be used when we add new drivers(VC shared memory and
> > > > > bcm2835-isp), hence it kept as it is for now.
> > > > > 
> > > > > Fixes: 1d8915cf8899 ("staging: vc04: Convert vchiq_log_error() to use dynamic debug")
> > > > > Signed-off-by: Umang Jain <umang.jain@xxxxxxxxxxxxxxxx>
> > > > > ---
> > > > >   .../vc04_services/interface/vchiq_arm/vchiq_connected.c       | 4 ++--
> > > > >   .../vc04_services/interface/vchiq_arm/vchiq_connected.h       | 4 +++-
> > > > >   2 files changed, 5 insertions(+), 3 deletions(-)
> > > > > 
> > > > > diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_connected.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_connected.c
> > > > > index b3928bd8c9c6..21f9fa1a1713 100644
> > > > > --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_connected.c
> > > > > +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_connected.c
> > > > > @@ -27,7 +27,7 @@ static void connected_init(void)
> > > > >    * be made immediately, otherwise it will be deferred until
> > > > >    * vchiq_call_connected_callbacks is called.
> > > > >    */
> > > > > -void vchiq_add_connected_callback(void (*callback)(void))
> > > > > +void vchiq_add_connected_callback(struct vchiq_device *device, void (*callback)(void))
> > > > You're changing the prototype of the function, but the patch doesn't
> > > > update any user. If the function is unused, it looks like you can drop
> > > > it instead. Looking at the rest of the vchiq_connected.c file, I think
> > > > you can actually drop the whole file.
> > > 
> > > I mentioned in the commit message of this patch. There will be users in the
> > > near future.
> > 
> > We write code for today, not any potential users in the future.  If it's
> > not used now, let's delete it and then when we need it in the future,
> > you can add it back then.
> 
> What was the near future on November the 7th is now the present :-)
> Umang has sent a new version of the ISP driver that uses this API. I
> think this kind of near future is fine, and we routinely do the same
> during review when large feature are split across multiple series
> (whether those series are merged together or independently is another
> question of course).

That other series is long gone from my review queue after the first
round of issues found with it, I had forgotten all about it :)

greg k-h




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux