Re: [PATCH 09/11] media: atomisp: partially get rid of one abstraction layer

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

 



Em Tue, 26 May 2020 10:26:05 +0300
Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx> escreveu:

> Hi Mauro,
> 
> On Mon, May 25, 2020 at 08:56:08AM +0200, Mauro Carvalho Chehab wrote:
> > The very same macros are defined as CSS_foo and IA_CSS_foo.
> > 
> > Remove this abstraction, as it just make things confusing,
> > for no good reason.  
> 
> I think this boils down to which prefix should the uAPI structs of this
> driver use. I'd prefer atomisp_something, ia_css has been used internally,
> and that probably has been there in later firmware versions (vs. just css).
> 
> At this point removing the duplication makes sense though, so I'm not
> proposing changes here.

Yeah, agreed. From CSS PoV, there are several abstraction layers: the "hive"
code, the "css" code (overlayed by a css layer for isp2400 and another one
for isp2401), the "ia_css" layer, the "compat_css20" layer, and the
"ia_css" layer. Finally, the "atomisp" upper layer.

>From namespace PoV, IA_CSS_foo is worse than CSS_foo. The best would be 
to use ATOMISP_foo, but there are still too much layers there abstracting
the code. For now, I prefer to keep the name used by the "IA_" layer,
in order to avoid needing to deal with symbol conflicts. Let's get
rid of it when we remove the IA_ abstraction as a hole.

Btw, the vast majority of this driver's source code is due to all those
layers.

We need to be careful to remove them. There are even some duplicated
structures there for the same thing, with some ugly compile-time
checks to identify if the same struct (with different name) still
preserves the same size. For now, I'm refraining touching these, as 
some of those structs could be used by the firmware (check needed).

My plan is to do the renaming once we get rid of those abstractions.

-

Btw, from practical PoV, I suspect that the next layer to be
removed would be the atomisp_compat_css20 one. Several functions
there are just wrapper ones.

Thanks,
Mauro
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux