Message ID | 1435922173-6531-10-git-send-email-vigneshr@ti.com |
---|---|
State | Superseded |
Delegated to: | Tom Rini |
Headers | show |
Vignesh wrote... [snip] > +#define BIT(x) (1 << (x)) > + Is this not something that would be better in a global header file somewhere rather than it starting a trend of a per-driver, per-arch, etc. definitions? Andy.
On 7/3/2015 7:27 PM, Andy Pont wrote: > Vignesh wrote... > > [snip] > >> +#define BIT(x) (1 << (x)) >> + > > Is this not something that would be better in a global header file somewhere rather than it starting a trend of a per-driver, per-arch, etc. definitions? I agree there are few per arch defintions. How about adding it to include/linux/bitops.h as in linux kernel? Regards Vignesh
On 4 July 2015 at 18:23, R, Vignesh <vigneshr@ti.com> wrote: > > > On 7/3/2015 7:27 PM, Andy Pont wrote: >> Vignesh wrote... >> >> [snip] >> >>> +#define BIT(x) (1 << (x)) >>> + >> >> Is this not something that would be better in a global header file somewhere rather than it starting a trend of a per-driver, per-arch, etc. definitions? > > I agree there are few per arch defintions. > How about adding it to include/linux/bitops.h as in linux kernel? Patch is under review [1] in fact you may give comment on the same. [1] https://patchwork.ozlabs.org/patch/470478/ thanks!
diff --git a/drivers/dma/ti-edma3.c b/drivers/dma/ti-edma3.c index 8184ded9fa81..638cf525a278 100644 --- a/drivers/dma/ti-edma3.c +++ b/drivers/dma/ti-edma3.c @@ -13,6 +13,8 @@ #include <common.h> #include <asm/ti-common/ti-edma3.h> +#define BIT(x) (1 << (x)) + #define EDMA3_SL_BASE(slot) (0x4000 + ((slot) << 5)) #define EDMA3_SL_MAX_NUM 512 #define EDMA3_SLOPT_FIFO_WIDTH_MASK (0x7 << 8)
Add BIT(x) macro definition to edma3 driver file. Fixes following compiler warning when CONFIG_TI_EDMA3 is enabled for am437x and dra7x: drivers/dma/ti-edma3.c: In function ‘edma3_set_dest’: drivers/dma/ti-edma3.c:92:10: warning: implicit declaration of function ‘BIT’ [-Wimplicit-function-declaration] Signed-off-by: Vignesh R <vigneshr@ti.com> --- drivers/dma/ti-edma3.c | 2 ++ 1 file changed, 2 insertions(+)