Re: [PATCH 09/14] mtd: maps: physmap: Fix coding style issues reported by checkpatch

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

 



On Tue, 9 Oct 2018 09:52:05 +0200
Boris Brezillon <boris.brezillon@xxxxxxxxxxx> wrote:

> > > @@ -163,13 +164,16 @@ static int physmap_flash_probe(struct platform_device *dev)
> > >                 simple_map_init(&info->maps[i]);
> > >
> > >                 probe_type = rom_probe_types;
> > > -               if (physmap_data->probe_type == NULL) {
> > > -                       for (; info->mtds[i] == NULL && *probe_type != NULL; probe_type++)
> > > -                               info->mtds[i] = do_map_probe(*probe_type, &info->maps[i]);
> > > -               } else
> > > -                       info->mtds[i] = do_map_probe(physmap_data->probe_type, &info->maps[i]);
> > > +               if (!physmap_data->probe_type) {
> > > +                       for (; !info->mtds[i] && *probe_type; probe_type++)
> > > +                               info->mtds[i] = do_map_probe(*probe_type,
> > > +                                                            &info->maps[i]);
> > > +               } else {
> > > +                       info->mtds[i] = do_map_probe(physmap_data->probe_type,
> > > +                                                    &info->maps[i]);
> > > +               }    
> > 
> > Now that you are at it, maybe you want to change the order of the if branches:
> > 
> > if (true){
> > } else{
> > }
> > 
> > and move:
> > probe_type = rom_probe_types;
> > into the branch
> > 
> > and fix:
> > const char * const *probe_type;
> > 
> > 
> > If you do not want to change it, is also fine :P  
> 
> I don't mind changing that, but not in this patch :-).

Actually, I'll let you send a patch on top of my series if you still
want to address that ;-).



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux