staging: hp100: Resolve indentation and space warnings generated by checkpatch
cover staging: hp100: Resolve indentation and space warnings generated by checkpatch
Patch 1:
No change introduced
Patch 2:
No change introduced.
Patch 3:
1.Change the patch subject to describe the changes more accurately. 2.Add space between signed of line and line before it.
Soumyajit Deb (3):
staging: hp100: Add space around operator +
staging: hp100: Remove space after * in pointer declarations
staging: hp100: Remove uneccessary blank lines
drivers/staging/hp/hp100.c | 61 ++++++++++++++++---------------------- 1 file changed, 26 insertions(+), 35 deletions(-)
Signature · 1 line
2.17.1
PATCH 1/3 staging: hp100: Add space around operator +
Add space around operator + to improve code readability. Reported by checkpatch.pl
--- drivers/staging/hp/hp100.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/hp/hp100.c +1 -1
@@ -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
Signature · 1 line
2.17.1
PATCH 2/3 staging: hp100: Remove space after * in pointer declarations
In reply to Soumyajit DebRemove space after * in pointer declaration to improve code readability and to adhere to the standard coding style.
Reported by checkpatch.pl
--- drivers/staging/hp/hp100.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/staging/hp/hp100.c +5 -5
@@ -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, - registerhp100_ring_t * ringptr, - registeru_int * pdlptr); + registerhp100_ring_t *ringptr, + registeru_int *pdlptr);static int hp100_init_txpdl (struct net_device *dev, - registerhp100_ring_t * ringptr, - registeru_int * pdlptr); + registerhp100_ring_t *ringptr, + registeru_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;
Signature · 1 line
2.17.1
PATCH 3/3 staging: hp100: Remove uneccessary blank lines
In reply to Soumyajit DebRemove 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
--- drivers/staging/hp/hp100.c | 49 ++++++++++++++++---------------------- 1 file changed, 20 insertions(+), 29 deletions(-)
drivers/staging/hp/hp100.c +20 -29
@@ -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, registerhp100_ring_t * ringptr, registeru32 * 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)
Signature · 1 line
2.17.1
Greg KH
maintainerQuoted 4 lines · Soumyajit Deb
Patch 1:
No change introduced
Quoted 8 lines
Patch 2:
No change introduced.
Patch 3:
1.Change the patch subject to describe the changes more accurately. 2.Add space between signed of line and line before it.
I already applied some of these, right?
Please rebase the series on my tree and only send the remaining patches that I have not applied.
thanks,
greg k-h