* [PATCH 0/3] Resolve indentation and space warnings generated by checkpatch
@ 2020-03-23 5:48 Soumyajit Deb
2020-03-23 5:48 ` [PATCH 1/3] staging: hp100: Add space around operator + Soumyajit Deb
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Soumyajit Deb @ 2020-03-23 5:48 UTC (permalink / raw)
To: outreachy-kernel; +Cc: gregkh, perex, Soumyajit Deb
This patchset adds space around operators and remove space after * in
pointer declarations and lastly removes uneccesary blank lines for the
same from the file hp100.c present under drivers/staging/hp/ directory.
Soumyajit Deb (3):
staging: hp100: Add space around operator +
staging: hp100: Remove space after * in pointer declarations
staging: hp100: Remove uneccessary blank lines and resolve indentation
issues
drivers/staging/hp/hp100.c | 61 ++++++++++++++++----------------------
1 file changed, 26 insertions(+), 35 deletions(-)
--
2.17.1
^ permalink raw reply [flat|nested] 8+ messages in thread* [PATCH 1/3] staging: hp100: Add space around operator + 2020-03-23 5:48 [PATCH 0/3] Resolve indentation and space warnings generated by checkpatch Soumyajit Deb @ 2020-03-23 5:48 ` Soumyajit Deb 2020-03-23 5:48 ` [PATCH 2/3] staging: hp100: Remove space after * in pointer declarations Soumyajit Deb ` (2 subsequent siblings) 3 siblings, 0 replies; 8+ messages in thread From: Soumyajit Deb @ 2020-03-23 5:48 UTC (permalink / raw) To: outreachy-kernel; +Cc: gregkh, perex, Soumyajit Deb Add space around operator + to improve code readability. Reported by checkpatch.pl Signed-off-by: Soumyajit Deb <debsoumyajit100@gmail.com> --- drivers/staging/hp/hp100.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/hp/hp100.c b/drivers/staging/hp/hp100.c index b89c4dcf53f5..00b3db8144c3 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 -- 2.17.1 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/3] staging: hp100: Remove space after * in pointer declarations 2020-03-23 5:48 [PATCH 0/3] Resolve indentation and space warnings generated by checkpatch Soumyajit Deb 2020-03-23 5:48 ` [PATCH 1/3] staging: hp100: Add space around operator + Soumyajit Deb @ 2020-03-23 5:48 ` Soumyajit Deb 2020-03-23 5:48 ` [PATCH 3/3] staging: hp100: Remove uneccessary blank lines and resolve indentation issues Soumyajit Deb 2020-03-23 10:36 ` [PATCH 0/3] Resolve indentation and space warnings generated by checkpatch Greg KH 3 siblings, 0 replies; 8+ messages in thread From: Soumyajit Deb @ 2020-03-23 5:48 UTC (permalink / raw) To: outreachy-kernel; +Cc: gregkh, perex, Soumyajit Deb Remove space after * in pointer declaration to improve code readability and to adhere to the standard coding style. Reported by checkpatch.pl Signed-off-by: Soumyajit Deb <debsoumyajit100@gmail.com> --- drivers/staging/hp/hp100.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/hp/hp100.c b/drivers/staging/hp/hp100.c index 00b3db8144c3..2cf1104cd2dd 100644 --- a/drivers/staging/hp/hp100.c +++ b/drivers/staging/hp/hp100.c @@ -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] 8+ messages in thread
* [PATCH 3/3] staging: hp100: Remove uneccessary blank lines and resolve indentation issues 2020-03-23 5:48 [PATCH 0/3] Resolve indentation and space warnings generated by checkpatch Soumyajit Deb 2020-03-23 5:48 ` [PATCH 1/3] staging: hp100: Add space around operator + Soumyajit Deb 2020-03-23 5:48 ` [PATCH 2/3] staging: hp100: Remove space after * in pointer declarations Soumyajit Deb @ 2020-03-23 5:48 ` Soumyajit Deb 2020-03-23 10:37 ` Greg KH 2020-03-23 10:36 ` [PATCH 0/3] Resolve indentation and space warnings generated by checkpatch Greg KH 3 siblings, 1 reply; 8+ messages in thread From: Soumyajit Deb @ 2020-03-23 5:48 UTC (permalink / raw) To: outreachy-kernel; +Cc: gregkh, perex, Soumyajit Deb Remove uneccessary blank lines which are flagged by checkpatch.pl as warning. Remove space between function name and ( . Add space after , and remove space between ( and next character in the if statement. Reported by checkpatch.pl Signed-off-by: Soumyajit Deb <debsoumyajit100@gmail.com> --- drivers/staging/hp/hp100.c | 49 ++++++++++++++++---------------------- 1 file changed, 20 insertions(+), 29 deletions(-) diff --git a/drivers/staging/hp/hp100.c b/drivers/staging/hp/hp100.c index 2cf1104cd2dd..fe76d53b1675 100644 --- a/drivers/staging/hp/hp100.c +++ b/drivers/staging/hp/hp100.c @@ -220,7 +220,6 @@ module_param(hp100_mode, int, 0); static int hp100_probe1(struct net_device *dev, int ioaddr, u_char bus, struct pci_dev *pci_dev); - static int hp100_open(struct net_device *dev); static int hp100_close(struct net_device *dev); static netdev_tx_t hp100_start_xmit(struct sk_buff *skb, @@ -297,7 +296,7 @@ static const char *hp100_read_id(int ioaddr) int i; static char str[HP100_SIG_LEN]; unsigned char sig[4], sum; - unsigned short rev; + unsigned short rev; hp100_page(ID_MAC_ADDR); sum = 0; @@ -346,8 +345,8 @@ static __init int hp100_isa_probe1(struct net_device *dev, int ioaddr) return hp100_probe1(dev, ioaddr, HP100_BUS_ISA, NULL); err: return -ENODEV; - } + /* * Probe for ISA board. * EISA and PCI are handled by device infrastructure. @@ -555,8 +554,8 @@ static int hp100_probe1(struct net_device *dev, int ioaddr, u_char bus, * can map the full 32bit address space. * Also, we can have EISA Busmaster cards (not tested), * so beware !!! - Jean II */ - if((bus == HP100_BUS_PCI) && - (pci_set_dma_mask(pci_dev, DMA_BIT_MASK(32)))) { + if ((bus == HP100_BUS_PCI) && + (pci_set_dma_mask(pci_dev, DMA_BIT_MASK(32)))) { /* Gracefully fallback to shared memory */ goto busmasterfail; } @@ -603,7 +602,7 @@ static int hp100_probe1(struct net_device *dev, int ioaddr, u_char bus, if (local_mode != 1) { /* = not busmaster */ /* We try with smaller memory sizes, if ioremap fails */ for (virt_memory_size = memory_size; virt_memory_size > 16383; virt_memory_size >>= 1) { - if ((mem_ptr_virt = ioremap((u_long) mem_ptr_phys, virt_memory_size)) == NULL) { + if ((mem_ptr_virt = ioremap((u_long)mem_ptr_phys, virt_memory_size)) == NULL) { #ifdef HP100_DEBUG printk("hp100: %s: ioremap for 0x%x bytes high PCI memory at 0x%lx failed\n", dev->name, virt_memory_size, mem_ptr_phys); #endif @@ -871,14 +870,13 @@ static void hp100_hwinit(struct net_device *dev) /* Finally try to log in the Hub if there may be a VG connection. */ if ((lp->lan_type == HP100_LAN_100) || (lp->lan_type == HP100_LAN_ERR)) hp100_login_to_vg_hub(dev, 0); /* relogin */ - } - /* * mmuinit - Reinitialise Cascade MMU and MAC settings. * Note: Must already be in reset and leaves card in reset. */ + static void hp100_mmuinit(struct net_device *dev) { int ioaddr = dev->base_addr; @@ -1127,10 +1125,10 @@ static int hp100_close(struct net_device *dev) return 0; } - /* * Configure the PDL Rx rings and LAN */ + static void hp100_init_pdls(struct net_device *dev) { struct hp100_private *lp = netdev_priv(dev); @@ -1209,7 +1207,6 @@ static int hp100_init_rxpdl(struct net_device *dev, return roundup(MAX_RX_FRAG * 2 + 2, 4); } - static int hp100_init_txpdl(struct net_device *dev, register hp100_ring_t * ringptr, register u32 * pdlptr) @@ -1568,7 +1565,6 @@ static netdev_tx_t hp100_start_xmit_bm(struct sk_buff *skb, return NETDEV_TX_OK; } - /* clean_txring checks if packets have been sent by the card by reading * the TX_PDL register from the performance page and comparing it to the * number of committed packets. It then frees the skb's of the packets that @@ -1576,6 +1572,7 @@ static netdev_tx_t hp100_start_xmit_bm(struct sk_buff *skb, * * Needs the PERFORMANCE page selected. */ + static void hp100_clean_txring(struct net_device *dev) { struct hp100_private *lp = netdev_priv(dev); @@ -1732,10 +1729,8 @@ static netdev_tx_t hp100_start_xmit(struct sk_buff *skb, drop: dev_kfree_skb(skb); return NETDEV_TX_OK; - } - /* * Receive Function (Non-Busmaster mode) * Called when an "Receive Packet" interrupt occurs, i.e. the receive @@ -1803,7 +1798,7 @@ static void hp100_rx(struct net_device *dev) u_char *ptr; - skb_reserve(skb,2); + skb_reserve(skb, 2); /* ptr to start of the sk_buff data area */ skb_put(skb, pkt_len); @@ -1811,7 +1806,7 @@ static void hp100_rx(struct net_device *dev) /* Now transfer the data from the card into that area */ if (lp->mode == 2) - memcpy_fromio(ptr, lp->mem_ptr_virt,pkt_len); + memcpy_fromio(ptr, lp->mem_ptr_virt, pkt_len); else /* io mapped */ insl(ioaddr + HP100_REG_DATA32, ptr, pkt_len >> 2); @@ -1946,13 +1941,13 @@ static void hp100_rx_bm(struct net_device *dev) hp100_outl((u32) lp->rxrtail->pdl_paddr, RX_PDA); lp->rxrtail = lp->rxrtail->next; } - } } /* * statistics */ + static struct net_device_stats *hp100_get_stats(struct net_device *dev) { unsigned long flags; @@ -2030,7 +2025,6 @@ static void hp100_clear_stats(struct hp100_private *lp, int ioaddr) spin_unlock_irqrestore(&lp->lock, flags); } - /* * multicast setup */ @@ -2454,11 +2448,11 @@ static int hp100_sense_lan(struct net_device *dev) } /* Those cards don't have a 100 Mbit connector */ - if ( !strcmp(lp->id, "HWP1920") || - (lp->pci_dev && - lp->pci_dev->vendor == PCI_VENDOR_ID && - (lp->pci_dev->device == PCI_DEVICE_ID_HP_J2970A || - lp->pci_dev->device == PCI_DEVICE_ID_HP_J2973A))) + if (!strcmp(lp->id, "HWP1920") || + (lp->pci_dev && + lp->pci_dev->vendor == PCI_VENDOR_ID && + (lp->pci_dev->device == PCI_DEVICE_ID_HP_J2970A || + lp->pci_dev->device == PCI_DEVICE_ID_HP_J2973A))) return HP100_LAN_ERR; if (val_VG & HP100_LINK_CABLE_ST) /* Can hear the HUBs tone. */ @@ -2797,7 +2791,6 @@ void hp100_RegisterDump(struct net_device *dev) } #endif - static void cleanup_dev(struct net_device *d) { struct hp100_private *p = netdev_priv(d); @@ -2918,7 +2911,6 @@ static void hp100_pci_remove(struct pci_dev *pdev) pci_disable_device(pdev); } - static struct pci_driver hp100_pci_driver = { .name = "hp100", .id_table = hp100_pci_tbl, @@ -2944,7 +2936,7 @@ MODULE_DESCRIPTION("HP CASCADE Architecture Driver for 100VG-AnyLan Network Adap #if defined(MODULE) && defined(CONFIG_ISA) #define HP100_DEVICES 5 /* Parameters set by insmod */ -static int hp100_port[HP100_DEVICES] = { 0, [1 ... (HP100_DEVICES-1)] = -1 }; +static int hp100_port[HP100_DEVICES] = { 0, [1 ... (HP100_DEVICES - 1)] = -1 }; module_param_hw_array(hp100_port, int, ioport, NULL, 0); /* List of devices */ @@ -3010,18 +3002,17 @@ static int __init hp100_module_init(void) out: return err; out3: - eisa_driver_unregister (&hp100_eisa_driver); + eisa_driver_unregister(&hp100_eisa_driver); out2: hp100_isa_cleanup(); goto out; } - static void __exit hp100_module_exit(void) { hp100_isa_cleanup(); - eisa_driver_unregister (&hp100_eisa_driver); - pci_unregister_driver (&hp100_pci_driver); + eisa_driver_unregister(&hp100_eisa_driver); + pci_unregister_driver(&hp100_pci_driver); } module_init(hp100_module_init) -- 2.17.1 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 3/3] staging: hp100: Remove uneccessary blank lines and resolve indentation issues 2020-03-23 5:48 ` [PATCH 3/3] staging: hp100: Remove uneccessary blank lines and resolve indentation issues Soumyajit Deb @ 2020-03-23 10:37 ` Greg KH 0 siblings, 0 replies; 8+ messages in thread From: Greg KH @ 2020-03-23 10:37 UTC (permalink / raw) To: Soumyajit Deb; +Cc: outreachy-kernel, perex On Mon, Mar 23, 2020 at 11:18:36AM +0530, Soumyajit Deb wrote: > Remove uneccessary blank lines which are flagged by checkpatch.pl as > warning. Remove space between function name and ( . Add space after , > and remove space between ( and next character in the if statement. > Reported by checkpatch.pl > Signed-off-by: Soumyajit Deb <debsoumyajit100@gmail.com> You need a blank line before the signed-off-by line :( Also, when you say "and" in a patch, that's a huge hint you need to break it up into two patches, like you should do here. Remember, each patch only does one "logical" thing. thanks, greg k-h ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/3] Resolve indentation and space warnings generated by checkpatch 2020-03-23 5:48 [PATCH 0/3] Resolve indentation and space warnings generated by checkpatch Soumyajit Deb ` (2 preceding siblings ...) 2020-03-23 5:48 ` [PATCH 3/3] staging: hp100: Remove uneccessary blank lines and resolve indentation issues Soumyajit Deb @ 2020-03-23 10:36 ` Greg KH 2020-03-23 11:23 ` Greg KH 3 siblings, 1 reply; 8+ messages in thread From: Greg KH @ 2020-03-23 10:36 UTC (permalink / raw) To: Soumyajit Deb; +Cc: outreachy-kernel, perex On Mon, Mar 23, 2020 at 11:18:33AM +0530, Soumyajit Deb wrote: > This patchset adds space around operators and remove space after * in > pointer declarations and lastly removes uneccesary blank lines for the > same from the file hp100.c present under drivers/staging/hp/ directory. > > Soumyajit Deb (3): > staging: hp100: Add space around operator + > staging: hp100: Remove space after * in pointer declarations > staging: hp100: Remove uneccessary blank lines and resolve indentation > issues > I somehow don't see patch 1/3 here, did it get lost somewhere? Also, be sure your subject line of the 0/3 matches the other patches (you forgot "staging" and the driver name...) thanks, greg k-h ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/3] Resolve indentation and space warnings generated by checkpatch 2020-03-23 10:36 ` [PATCH 0/3] Resolve indentation and space warnings generated by checkpatch Greg KH @ 2020-03-23 11:23 ` Greg KH 2020-03-23 11:27 ` Soumyajit Deb 0 siblings, 1 reply; 8+ messages in thread From: Greg KH @ 2020-03-23 11:23 UTC (permalink / raw) To: Soumyajit Deb; +Cc: outreachy-kernel, perex On Mon, Mar 23, 2020 at 11:36:52AM +0100, Greg KH wrote: > On Mon, Mar 23, 2020 at 11:18:33AM +0530, Soumyajit Deb wrote: > > This patchset adds space around operators and remove space after * in > > pointer declarations and lastly removes uneccesary blank lines for the > > same from the file hp100.c present under drivers/staging/hp/ directory. > > > > Soumyajit Deb (3): > > staging: hp100: Add space around operator + > > staging: hp100: Remove space after * in pointer declarations > > staging: hp100: Remove uneccessary blank lines and resolve indentation > > issues > > > > I somehow don't see patch 1/3 here, did it get lost somewhere? Found it in my spam folder, gmail's fault, sorry for the noise. greg k-h ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/3] Resolve indentation and space warnings generated by checkpatch 2020-03-23 11:23 ` Greg KH @ 2020-03-23 11:27 ` Soumyajit Deb 0 siblings, 0 replies; 8+ messages in thread From: Soumyajit Deb @ 2020-03-23 11:27 UTC (permalink / raw) To: Greg KH; +Cc: outreachy-kernel, perex [-- Attachment #1: Type: text/plain, Size: 865 bytes --] No problem, thanks! On Mon, 23 Mar 2020 at 16:53, Greg KH <gregkh@linuxfoundation.org> wrote: > On Mon, Mar 23, 2020 at 11:36:52AM +0100, Greg KH wrote: > > On Mon, Mar 23, 2020 at 11:18:33AM +0530, Soumyajit Deb wrote: > > > This patchset adds space around operators and remove space after * in > > > pointer declarations and lastly removes uneccesary blank lines for the > > > same from the file hp100.c present under drivers/staging/hp/ directory. > > > > > > Soumyajit Deb (3): > > > staging: hp100: Add space around operator + > > > staging: hp100: Remove space after * in pointer declarations > > > staging: hp100: Remove uneccessary blank lines and resolve > indentation > > > issues > > > > > > > I somehow don't see patch 1/3 here, did it get lost somewhere? > > Found it in my spam folder, gmail's fault, sorry for the noise. > > > greg k-h > [-- Attachment #2: Type: text/html, Size: 1301 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2020-03-23 11:27 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2020-03-23 5:48 [PATCH 0/3] Resolve indentation and space warnings generated by checkpatch Soumyajit Deb 2020-03-23 5:48 ` [PATCH 1/3] staging: hp100: Add space around operator + Soumyajit Deb 2020-03-23 5:48 ` [PATCH 2/3] staging: hp100: Remove space after * in pointer declarations Soumyajit Deb 2020-03-23 5:48 ` [PATCH 3/3] staging: hp100: Remove uneccessary blank lines and resolve indentation issues Soumyajit Deb 2020-03-23 10:37 ` Greg KH 2020-03-23 10:36 ` [PATCH 0/3] Resolve indentation and space warnings generated by checkpatch Greg KH 2020-03-23 11:23 ` Greg KH 2020-03-23 11:27 ` 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.