RE: [PATCH rdma-next v1 1/2] IB/core: Let IB core distribute cache update events

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

 




> -----Original Message-----
> From: Jason Gunthorpe <jgg@xxxxxxxxxxxx>
> Sent: Tuesday, October 29, 2019 10:24 AM
> To: Leon Romanovsky <leon@xxxxxxxxxx>
> Cc: Doug Ledford <dledford@xxxxxxxxxx>; Leon Romanovsky
> <leonro@xxxxxxxxxxxx>; RDMA mailing list <linux-rdma@xxxxxxxxxxxxxxx>;
> Daniel Jurgens <danielj@xxxxxxxxxxxx>; Parav Pandit <parav@xxxxxxxxxxxx>
> Subject: Re: [PATCH rdma-next v1 1/2] IB/core: Let IB core distribute cache
> update events
> 
> On Tue, Oct 29, 2019 at 01:53:26PM +0200, Leon Romanovsky wrote:
> > -static void ib_cache_update(struct ib_device *device,
> > -			    u8                port,
> > -			    bool	      enforce_security)
> > +static int
> > +ib_cache_update(struct ib_device *device, u8 port, bool
> 	enforce_security)
> >  {
> 
> Formatting
> 
Will fix it.

> > +/**
> > + * ib_dispatch_event - Dispatch an asynchronous event
> > + * @event:Event to dispatch
> > + *
> > + * Low-level drivers must call ib_dispatch_event() to dispatch the
> > + * event to all registered event handlers when an asynchronous event
> > + * occurs.
> > + */
> > +void ib_dispatch_event(struct ib_event *event) {
> > +	ib_enqueue_cache_update_event(event);
> > +}
> >  EXPORT_SYMBOL(ib_dispatch_event);
> 
> Why not just move this into cache.c?
> 
Same thought same to me when I had to add one liner call.
However the issue was device.c has the code for the event registration/unregistration and calling the handlers unrelated to cache.
So moving ib_dispatch_event() to cache.c looked incorrect to me.

> Jason




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux