crypto: talitos - talitos_ptr renamed ptr for more lisibility
PATCH v3 3/17 crypto: talitos - talitos_ptr renamed ptr for more lisibility
Linux CodyingStyle recommends to use short variables for local variables. ptr is just good enough for those 3 lines functions. It helps keep single lines shorter than 80 characters.
--- drivers/crypto/talitos.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-)
drivers/crypto/talitos.c +10 -10
@@ -55,37 +55,37 @@#include "talitos.h" -static void to_talitos_ptr (struct talitos_ptr *talitos_ptr,dma_addr_t dma_addr) +static void to_talitos_ptr (struct talitos_ptr *ptr,dma_addr_t dma_addr) { - talitos_ptr->ptr =cpu_to_be32 (lower_32_bits (dma_addr)); - talitos_ptr->eptr =upper_32_bits (dma_addr); + ptr->ptr =cpu_to_be32 (lower_32_bits (dma_addr)); + ptr->eptr =upper_32_bits (dma_addr); }/* * map virtual single (contiguous) pointer to h/w descriptor pointer */ static void map_single_talitos_ptr (struct device *dev, -struct talitos_ptr *talitos_ptr, +struct talitos_ptr *ptr,unsigned short len,void *data,unsigned char extent,enum dma_data_direction dir) {dma_addr_t dma_addr =dma_map_single (dev, data, len, dir); - talitos_ptr->len =cpu_to_be16 (len); -to_talitos_ptr (talitos_ptr, dma_addr); - talitos_ptr->j_extent = extent; + ptr->len =cpu_to_be16 (len); +to_talitos_ptr (ptr, dma_addr); + ptr->j_extent = extent; }/* * unmap bus single (contiguous) h/w descriptor pointer */ static void unmap_single_talitos_ptr (struct device *dev, -struct talitos_ptr *talitos_ptr, +struct talitos_ptr *ptr,enum dma_data_direction dir) { -dma_unmap_single (dev,be32_to_cpu (talitos_ptr->ptr), -be16_to_cpu (talitos_ptr->len), dir); +dma_unmap_single (dev,be32_to_cpu (ptr->ptr), +be16_to_cpu (ptr->len), dir); }static int reset_channel (struct device *dev,int ch)
Signature · 6 lines
2.1.0 _______________________________________________ Linuxppc-dev mailing list [email protected] https://lists.ozlabs.org/listinfo/linuxppc-dev
From: Christophe Leroy
Quoted 3 lines
Linux CodyingStyle recommends to use short variables for local variables. ptr is just good enough for those 3 lines functions. It helps keep single lines shorter than 80 characters.
...
drivers/crypto/talitos.c line 62
Quoted 8 lines
drivers/crypto/talitos.c +3
-3-static void to_talitos_ptr (struct talitos_ptr *talitos_ptr,dma_addr_t dma_addr) +static void to_talitos_ptr (struct talitos_ptr *ptr,dma_addr_t dma_addr) { - talitos_ptr->ptr =cpu_to_be32 (lower_32_bits (dma_addr)); - talitos_ptr->eptr =upper_32_bits (dma_addr); + ptr->ptr =cpu_to_be32 (lower_32_bits (dma_addr)); + ptr->eptr =upper_32_bits (dma_addr); }
...
Maybe, but 'ptr' isn't a good choice.
David
Quoted 15 lines · David Laight
From: Christophe Leroy
Quoted 3 lines
Linux CodyingStyle recommends to use short variables for local variables. ptr is just good enough for those 3 lines functions. It helps keep single lines shorter than 80 characters.
...
Quoted 8 lines
drivers/crypto/talitos.c +3
-3-static void to_talitos_ptr (struct talitos_ptr *talitos_ptr,dma_addr_t dma_addr) +static void to_talitos_ptr (struct talitos_ptr *ptr,dma_addr_t dma_addr) { - talitos_ptr->ptr =cpu_to_be32 (lower_32_bits (dma_addr)); - talitos_ptr->eptr =upper_32_bits (dma_addr); + ptr->ptr =cpu_to_be32 (lower_32_bits (dma_addr)); + ptr->eptr =upper_32_bits (dma_addr); }...
Quoted 3 lines
Maybe, but 'ptr' isn't a good choice.
Any suggestion ?
Christophe