> +static void lan743x_intr_unregister_isr(struct lan743x_adapter *adapter,
> + int vector_index)
> +{
> + struct lan743x_vector *vector = &adapter->intr.vector_list
> + [vector_index];
> +
> + devm_free_irq(&adapter->p
Hi Bryan,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on net-next/master]
url:
https://github.com/0day-ci/linux/commits/Bryan-Whitehead/lan743x-Add-new-lan743x-driver/20180222-225510
reproduce:
# apt-get install sparse
make ARCH=x86_64 allm
> > +static void lan743x_intr_unregister_isr(struct lan743x_adapter *adapter,
> > + int vector_index)
> > +{
> > + struct lan743x_vector *vector = &adapter->intr.vector_list
> > + [vector_index];
> > +
> > + devm_free_irq(&adap
On 02/22/2018 01:31 PM, bryan.whiteh...@microchip.com wrote:
>>> +static void lan743x_intr_unregister_isr(struct lan743x_adapter *adapter,
>>> + int vector_index)
>>> +{
>>> + struct lan743x_vector *vector = &adapter->intr.vector_list
>>> +
> Also I'm allocating interrupt resources on interface up, and freeing resources
> on interface down. So if there is an up, down, up sequence then the driver
> will allocate resources twice. In order for devm to work properly, should I
> move all resource allocation into the probe function?
Hi Bry
On Thu, Feb 22, 2018 at 10:45:34PM +0100, Andrew Lunn wrote:
> > Also I'm allocating interrupt resources on interface up, and freeing
> > resources
> > on interface down. So if there is an up, down, up sequence then the driver
> > will allocate resources twice. In order for devm to work properly,
On 02/21/2018 11:06 AM, Bryan Whitehead wrote:
> Add main source files for new lan743x driver.
>
> Signed-off-by: Bryan Whitehead
> ---
> +lan743x-objs := lan743x_main.o
Should we assume that you have additional object files you would like to
contribute at a later point? If that is the case, th
> On Thu, Feb 22, 2018 at 10:45:34PM +0100, Andrew Lunn wrote:
> > > Also I'm allocating interrupt resources on interface up, and freeing
> > > resources on interface down. So if there is an up, down, up sequence
> > > then the driver will allocate resources twice. In order for devm to
> > > work p
Hi Florian,
Thanks for your review. I have the following questions/comments.
> On 02/21/2018 11:06 AM, Bryan Whitehead wrote:
> > Add main source files for new lan743x driver.
> >
> > Signed-off-by: Bryan Whitehead
> > ---
>
> > +lan743x-objs := lan743x_main.o
>
> Should we assume that you have
> Ok, but it seems to me that what I have is an example of "specific book
> keeping
> private information". Can you clarify the style you prefer?
>
> In cases of allocation where I can just compare a pointer to null, I can
> easily remove
> the flags. But in other cases I need a record of which
> > Ok, but it seems to me that what I have is an example of "specific
> > book keeping private information". Can you clarify the style you prefer?
> >
> > In cases of allocation where I can just compare a pointer to null, I
> > can easily remove the flags. But in other cases I need a record of
> >
> But the other case is when things fail anywhere during probe, or
> open. In these cases things are partially initialized and I assumed
> I needed to clean up whatever was initialized successfully before
> returning an error. I used flags so I could share a common clean up
> function for all possi
> Hi Bryan
>
> It is good to look at other drivers and see how they work. Ideally, your
> driver
> wants to look similar to all other drivers, so making the maintenance easier.
>
> You will find that most drivers have a set of goto statements for error
> handling, which jump to the end of the fu
13 matches
Mail list logo