* [PATCH] staging: hp100: Add space around + operator and remove space around pointers
@ 2020-03-22 13:44 Soumyajit Deb
0 siblings, 0 replies; 3+ messages in thread
From: Soumyajit Deb @ 2020-03-22 13:44 UTC (permalink / raw)
To: gregkh; +Cc: perex, outreachy-kernel
Add space around + operator and remove space after * in pointer
declaration to improve code readability
Reported by checkpatch.pl
Signed-off-by: Soumyajit Deb <debsoumyajit100@gmail.com>
---
drivers/staging/hp/hp100.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/hp/hp100.c b/drivers/staging/hp/hp100.c
index b89c4dcf53f5..2cf1104cd2dd 100644
--- a/drivers/staging/hp/hp100.c
+++ b/drivers/staging/hp/hp100.c
@@ -119,7 +119,7 @@
#define HP100_REGION_SIZE 0x20 /* for ioports */
#define HP100_SIG_LEN 8 /* same as EISA_SIG_LEN */
-#define HP100_MAX_PACKET_SIZE (1536+4)
+#define HP100_MAX_PACKET_SIZE (1536 + 4)
#define HP100_MIN_PACKET_SIZE 60
#ifndef HP100_DEFAULT_RX_RATIO
@@ -246,11 +246,11 @@ static void hp100_BM_shutdown(struct net_device *dev);
static void hp100_mmuinit(struct net_device *dev);
static void hp100_init_pdls(struct net_device *dev);
static int hp100_init_rxpdl(struct net_device *dev,
- register hp100_ring_t * ringptr,
- register u_int * pdlptr);
+ register hp100_ring_t *ringptr,
+ register u_int *pdlptr);
static int hp100_init_txpdl(struct net_device *dev,
- register hp100_ring_t * ringptr,
- register u_int * pdlptr);
+ register hp100_ring_t *ringptr,
+ register u_int *pdlptr);
static void hp100_rxfill(struct net_device *dev);
static void hp100_hwinit(struct net_device *dev);
static void hp100_clean_txring(struct net_device *dev);
@@ -264,7 +264,7 @@ static void hp100_RegisterDump(struct net_device *dev);
* because it was properly DMA allocated via pci_alloc_consistent(),
* so we just need to "retrieve" the original mapping to bus/phys/dma
* address - Jean II */
-static inline dma_addr_t virt_to_whatever(struct net_device *dev, u32 * ptr)
+static inline dma_addr_t virt_to_whatever(struct net_device *dev, u32 *ptr)
{
struct hp100_private *lp = netdev_priv(dev);
return ((u_long) ptr) + lp->whatever_offset;
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] staging: hp100: Add space around + operator and remove space around pointers
@ 2020-03-22 13:48 Soumyajit Deb
2020-03-22 13:55 ` [Outreachy kernel] " Julia Lawall
0 siblings, 1 reply; 3+ messages in thread
From: Soumyajit Deb @ 2020-03-22 13:48 UTC (permalink / raw)
To: outreachy-kernel; +Cc: gregkh, perex
Add space around + operator and remove space after * in pointer
declaration to improve code readability
Reported by checkpatch.pl
Signed-off-by: Soumyajit Deb <debsoumyajit100@gmail.com>
---
drivers/staging/hp/hp100.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/hp/hp100.c b/drivers/staging/hp/hp100.c
index b89c4dcf53f5..2cf1104cd2dd 100644
--- a/drivers/staging/hp/hp100.c
+++ b/drivers/staging/hp/hp100.c
@@ -119,7 +119,7 @@
#define HP100_REGION_SIZE 0x20 /* for ioports */
#define HP100_SIG_LEN 8 /* same as EISA_SIG_LEN */
-#define HP100_MAX_PACKET_SIZE (1536+4)
+#define HP100_MAX_PACKET_SIZE (1536 + 4)
#define HP100_MIN_PACKET_SIZE 60
#ifndef HP100_DEFAULT_RX_RATIO
@@ -246,11 +246,11 @@ static void hp100_BM_shutdown(struct net_device *dev);
static void hp100_mmuinit(struct net_device *dev);
static void hp100_init_pdls(struct net_device *dev);
static int hp100_init_rxpdl(struct net_device *dev,
- register hp100_ring_t * ringptr,
- register u_int * pdlptr);
+ register hp100_ring_t *ringptr,
+ register u_int *pdlptr);
static int hp100_init_txpdl(struct net_device *dev,
- register hp100_ring_t * ringptr,
- register u_int * pdlptr);
+ register hp100_ring_t *ringptr,
+ register u_int *pdlptr);
static void hp100_rxfill(struct net_device *dev);
static void hp100_hwinit(struct net_device *dev);
static void hp100_clean_txring(struct net_device *dev);
@@ -264,7 +264,7 @@ static void hp100_RegisterDump(struct net_device *dev);
* because it was properly DMA allocated via pci_alloc_consistent(),
* so we just need to "retrieve" the original mapping to bus/phys/dma
* address - Jean II */
-static inline dma_addr_t virt_to_whatever(struct net_device *dev, u32 * ptr)
+static inline dma_addr_t virt_to_whatever(struct net_device *dev, u32 *ptr)
{
struct hp100_private *lp = netdev_priv(dev);
return ((u_long) ptr) + lp->whatever_offset;
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Outreachy kernel] [PATCH] staging: hp100: Add space around + operator and remove space around pointers
2020-03-22 13:48 [PATCH] staging: hp100: Add space around + operator and remove space around pointers Soumyajit Deb
@ 2020-03-22 13:55 ` Julia Lawall
0 siblings, 0 replies; 3+ messages in thread
From: Julia Lawall @ 2020-03-22 13:55 UTC (permalink / raw)
To: Soumyajit Deb; +Cc: outreachy-kernel, gregkh, perex
On Sun, 22 Mar 2020, Soumyajit Deb wrote:
> Add space around + operator and remove space after * in pointer
> declaration to improve code readability
> Reported by checkpatch.pl
Did you send the same thing twice?
julia
>
> Signed-off-by: Soumyajit Deb <debsoumyajit100@gmail.com>
> ---
> drivers/staging/hp/hp100.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/staging/hp/hp100.c b/drivers/staging/hp/hp100.c
> index b89c4dcf53f5..2cf1104cd2dd 100644
> --- a/drivers/staging/hp/hp100.c
> +++ b/drivers/staging/hp/hp100.c
> @@ -119,7 +119,7 @@
> #define HP100_REGION_SIZE 0x20 /* for ioports */
> #define HP100_SIG_LEN 8 /* same as EISA_SIG_LEN */
>
> -#define HP100_MAX_PACKET_SIZE (1536+4)
> +#define HP100_MAX_PACKET_SIZE (1536 + 4)
> #define HP100_MIN_PACKET_SIZE 60
>
> #ifndef HP100_DEFAULT_RX_RATIO
> @@ -246,11 +246,11 @@ static void hp100_BM_shutdown(struct net_device *dev);
> static void hp100_mmuinit(struct net_device *dev);
> static void hp100_init_pdls(struct net_device *dev);
> static int hp100_init_rxpdl(struct net_device *dev,
> - register hp100_ring_t * ringptr,
> - register u_int * pdlptr);
> + register hp100_ring_t *ringptr,
> + register u_int *pdlptr);
> static int hp100_init_txpdl(struct net_device *dev,
> - register hp100_ring_t * ringptr,
> - register u_int * pdlptr);
> + register hp100_ring_t *ringptr,
> + register u_int *pdlptr);
> static void hp100_rxfill(struct net_device *dev);
> static void hp100_hwinit(struct net_device *dev);
> static void hp100_clean_txring(struct net_device *dev);
> @@ -264,7 +264,7 @@ static void hp100_RegisterDump(struct net_device *dev);
> * because it was properly DMA allocated via pci_alloc_consistent(),
> * so we just need to "retrieve" the original mapping to bus/phys/dma
> * address - Jean II */
> -static inline dma_addr_t virt_to_whatever(struct net_device *dev, u32 * ptr)
> +static inline dma_addr_t virt_to_whatever(struct net_device *dev, u32 *ptr)
> {
> struct hp100_private *lp = netdev_priv(dev);
> return ((u_long) ptr) + lp->whatever_offset;
> --
> 2.17.1
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20200322134852.GA30778%40ubuntu.
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-03-22 13:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-22 13:48 [PATCH] staging: hp100: Add space around + operator and remove space around pointers Soumyajit Deb
2020-03-22 13:55 ` [Outreachy kernel] " Julia Lawall
-- strict thread matches above, loose matches on Subject: below --
2020-03-22 13:44 Soumyajit Deb
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.