lkml.org 
[lkml]   [2024]   [Jan]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 23/24] platform: Modify platform_get_irq_optional() to use resource
On Wed, Dec 27, 2023 at 01:33:14PM -0700, Mark Hasemeyer wrote:
> > > - struct resource *r;
> > ...
> > > + struct resource *platform_res = platform_get_resource(dev, IORESOURCE_IRQ, num);
> >
> > This is quite unusual (as far as cleanup.h is not used and there is no place
> > for it here).
>
> Sorry, what's unusual? The declaration of a separate 'platform_res'?
> If so, I introduced it because I wanted to avoid setting 'r' if
> 'irq_get_irq_data()' fails below.

Defining the variable in the depth of the code.
There are exceptions, but usually we follow the style that definitions are
grouped at the top of the {} scope(s).


--
With Best Regards,
Andy Shevchenko



\
 
 \ /
  Last update: 2024-01-06 15:21    [W:0.086 / U:1.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site