[PATCH] Staging: gdm72xx: gdm_wimax: Fixed coding style issues.
Fixed following coding style issues. - No space is necessary after a cast - Alignment should match open parenthesis - Braces {} should be used on all arms of this statement Signed-off-by: Junsu Shin x --- drivers/staging/gdm72xx/gdm_wimax.c | 71 ++- 1 file changed, 36 insertions(+), 35 deletions(-) diff --git a/drivers/staging/gdm72xx/gdm_wimax.c b/drivers/staging/gdm72xx/gdm_wimax.c index 05ce2a2..a3ba931 100644 --- a/drivers/staging/gdm72xx/gdm_wimax.c +++ b/drivers/staging/gdm72xx/gdm_wimax.c @@ -135,24 +135,24 @@ static void dump_eth_packet(struct net_device *dev, const char *title, u16 port = 0; protocol = (data[12]<<8) | data[13]; - ih = (struct iphdr *) (data+ETH_HLEN); + ih = (struct iphdr *)(data+ETH_HLEN); if (protocol == ETH_P_IP) { - uh = (struct udphdr *) ((char *)ih + sizeof(struct iphdr)); + uh = (struct udphdr *)((char *)ih + sizeof(struct iphdr)); ip_protocol = ih->protocol; port = ntohs(uh->dest); } else if (protocol == ETH_P_IPV6) { - struct ipv6hdr *i6h = (struct ipv6hdr *) data; - uh = (struct udphdr *) ((char *)i6h + sizeof(struct ipv6hdr)); + struct ipv6hdr *i6h = (struct ipv6hdr *)data; + uh = (struct udphdr *)((char *)i6h + sizeof(struct ipv6hdr)); ip_protocol = i6h->nexthdr; port = ntohs(uh->dest); } netdev_dbg(dev, "[%s] len=%d, %s, %s, %s\n", - title, len, - get_protocol_name(protocol), - get_ip_protocol_name(ip_protocol), - get_port_name(port)); + title, len, + get_protocol_name(protocol), + get_ip_protocol_name(ip_protocol), + get_port_name(port)); if (!(data[0] == 0xff && data[1] == 0xff)) { if (protocol == ETH_P_IP) @@ -196,7 +196,7 @@ static void gdm_wimax_event_rcv(struct net_device *dev, u16 type, void *msg, { struct nic *nic = netdev_priv(dev); - u8 *buf = (u8 *) msg; + u8 *buf = (u8 *)msg; u16 hci_cmd = (buf[0]<<8) | buf[1]; u16 hci_len = (buf[2]<<8) | buf[3]; netdev_dbg(dev, "H=>D: 0x%04x(%d)\n", hci_cmd, hci_len); @@ -263,9 +263,9 @@ static struct evt_entry *get_event_entry(void) { struct evt_entry *e; - if (list_empty(&wm_event.freeq)) + if (list_empty(&wm_event.freeq)) { e = alloc_event_entry(); - else { + } else { e = list_entry(wm_event.freeq.next, struct evt_entry, list); list_del(&e->list); } @@ -347,7 +347,7 @@ int gdm_wimax_send_tx(struct sk_buff *skb, struct net_device *dev) struct nic *nic = netdev_priv(dev); ret = gdm_wimax_send_with_cb(nic, skb->data, skb->len, tx_complete, - nic); +nic); if (ret == -ENOSPC) { netif_stop_queue(dev); ret = 0; @@ -368,7 +368,7 @@ static int gdm_wimax_tx(struct sk_buff *skb, struct net_device *dev) { int ret = 0; struct nic *nic = netdev_priv(dev); - struct fsm_s *fsm = (struct fsm_s *) nic->sdk_data[SIOC_DATA_FSM].buf; + struct fsm_s *fsm = (struct fsm_s *)nic->sdk_data[SIOC_DATA_FSM].buf; dump_eth_packet(dev, "TX", skb->data, skb->len); @@ -379,9 +379,9 @@ static int gdm_wimax_tx(struct sk_buff *skb, struct net_device *dev) } #if !defined(LOOPBACK_TEST) - if (!fsm) + if (!fsm) { netdev_err(dev, "ASSERTION ERROR: fsm is NULL!!\n"); - else if (fsm->m_status != M_CONNECTED) { + } else if (fsm->m_status != M_CONNECTED) { netdev_emerg(dev, "ASSERTION ERROR: Device is NOT ready. status=%d\n", fsm->m_status); kfree_skb(skb); @@ -408,7 +408,7 @@ static int gdm_wimax_set_config(struct net_device *dev, struct ifmap *map) static void __gdm_wimax_set_mac_addr(struct net_device *dev, char *mac_addr) { u16 hci_pkt_buf[32 / sizeof(u16)]; - u8 *pkt = (u8 *) &hci_pkt_buf[0]; + u8 *pkt = (u8 *)&hci_pkt_buf[0]; struct nic *nic = netdev_priv(dev); /* Since dev is registered as a ethernet device, @@ -454,7 +454,7 @@ static struct net_device_stats *gdm_wimax_stats(struct net_device *dev) static int gdm_wimax_open(struct net_device *dev) { struct nic *nic = netdev_priv(dev); - struct fsm_s *fsm = (struct fsm_s *) nic->sdk_data[SIOC_DATA_FSM].buf; + struct fsm_s *fsm = (struct fsm_s *)nic->sdk_data[SIOC_DATA_FSM].buf; netif_start_queue(dev); @@ -466,7 +466,7 @@ static int gdm_wimax_open(struct net_
[PATCH 1/1] Staging: media: davinci_vpfe: fix over 80 characters coding style issue.
This is a patch to the dm365_ipipe.c that fixes over 80 characters warning detected by checkpatch.pl. Signed-off-by: Junsu Shin --- drivers/staging/media/davinci_vpfe/dm365_ipipe.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/staging/media/davinci_vpfe/dm365_ipipe.c b/drivers/staging/media/davinci_vpfe/dm365_ipipe.c index 1bbb90c..57cd274 100644 --- a/drivers/staging/media/davinci_vpfe/dm365_ipipe.c +++ b/drivers/staging/media/davinci_vpfe/dm365_ipipe.c @@ -1536,8 +1536,9 @@ ipipe_get_format(struct v4l2_subdev *sd, struct v4l2_subdev_pad_config *cfg, * @fse: pointer to v4l2_subdev_frame_size_enum structure. */ static int -ipipe_enum_frame_size(struct v4l2_subdev *sd, struct v4l2_subdev_pad_config *cfg, - struct v4l2_subdev_frame_size_enum *fse) +ipipe_enum_frame_size(struct v4l2_subdev *sd, + struct v4l2_subdev_pad_config *cfg, + struct v4l2_subdev_frame_size_enum *fse) { struct vpfe_ipipe_device *ipipe = v4l2_get_subdevdata(sd); struct v4l2_mbus_framefmt format; -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] Staging: media: davinci_vpfe: Fix over 80 characters coding style issue
This is a patch to the dm365_ipipe.c that fixes over 80 characters warning detected. Signed-off-by: Junsu Shin --- drivers/staging/media/davinci_vpfe/dm365_ipipe.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/staging/media/davinci_vpfe/dm365_ipipe.c b/drivers/staging/media/davinci_vpfe/dm365_ipipe.c index 1bbb90c..a474adf 100644 --- a/drivers/staging/media/davinci_vpfe/dm365_ipipe.c +++ b/drivers/staging/media/davinci_vpfe/dm365_ipipe.c @@ -1536,8 +1536,9 @@ ipipe_get_format(struct v4l2_subdev *sd, struct v4l2_subdev_pad_config *cfg, * @fse: pointer to v4l2_subdev_frame_size_enum structure. */ static int -ipipe_enum_frame_size(struct v4l2_subdev *sd, struct v4l2_subdev_pad_config *cfg, - struct v4l2_subdev_frame_size_enum *fse) +ipipe_enum_frame_size(struct v4l2_subdev *sd, + struct v4l2_subdev_pad_config *cfg, + struct v4l2_subdev_frame_size_enum *fse) { struct vpfe_ipipe_device *ipipe = v4l2_get_subdevdata(sd); struct v4l2_mbus_framefmt format; -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 1/1] Staging: media: davinci_vpfe: fix over 80 characters coding style issue.
On 08/06/2015 11:45 PM, Sudip Mukherjee wrote: > On Thu, Aug 06, 2015 at 09:55:54PM -0500, Junsu Shin wrote: >> This is a patch to the dm365_ipipe.c that fixes over 80 characters warning >> detected by checkpatch.pl. >> Signed-off-by: Junsu Shin > please do not use whitespace before Signed-off-by: line. >> >> --- >> drivers/staging/media/davinci_vpfe/dm365_ipipe.c | 5 +++-- >> 1 file changed, 3 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/staging/media/davinci_vpfe/dm365_ipipe.c >> b/drivers/staging/media/davinci_vpfe/dm365_ipipe.c >> index 1bbb90c..57cd274 100644 >> --- a/drivers/staging/media/davinci_vpfe/dm365_ipipe.c >> +++ b/drivers/staging/media/davinci_vpfe/dm365_ipipe.c >> @@ -1536,8 +1536,9 @@ ipipe_get_format(struct v4l2_subdev *sd, struct >> v4l2_subdev_pad_config *cfg, >> * @fse: pointer to v4l2_subdev_frame_size_enum structure. >> */ >> static int >> -ipipe_enum_frame_size(struct v4l2_subdev *sd, struct v4l2_subdev_pad_config >> *cfg, >> - struct v4l2_subdev_frame_size_enum *fse) >> +ipipe_enum_frame_size(struct v4l2_subdev *sd, >> +struct v4l2_subdev_pad_config *cfg, >> +struct v4l2_subdev_frame_size_enum *fse) > since you are modifying this line, please fix up the indention also. > > regards > sudip > Thanks for pointing it out. Again, this is a patch to the dm365_ipipe.c that fixes over 80 characters warning detected by the script. This time I fixed up the indentation issue claimed in the previous one. Signed-off-by: Junsu Shin --- drivers/staging/media/davinci_vpfe/dm365_ipipe.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/staging/media/davinci_vpfe/dm365_ipipe.c b/drivers/staging/media/davinci_vpfe/dm365_ipipe.c index 1bbb90c..a474adf 100644 --- a/drivers/staging/media/davinci_vpfe/dm365_ipipe.c +++ b/drivers/staging/media/davinci_vpfe/dm365_ipipe.c @@ -1536,8 +1536,9 @@ ipipe_get_format(struct v4l2_subdev *sd, struct v4l2_subdev_pad_config *cfg, * @fse: pointer to v4l2_subdev_frame_size_enum structure. */ static int -ipipe_enum_frame_size(struct v4l2_subdev *sd, struct v4l2_subdev_pad_config *cfg, - struct v4l2_subdev_frame_size_enum *fse) +ipipe_enum_frame_size(struct v4l2_subdev *sd, + struct v4l2_subdev_pad_config *cfg, + struct v4l2_subdev_frame_size_enum *fse) { struct vpfe_ipipe_device *ipipe = v4l2_get_subdevdata(sd); struct v4l2_mbus_framefmt format; -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] Staging: android: ion: Fix missing a blank line coding style issue.
This is a patch to the ion.c that fixes a warning that tells missing a blank line after declaration Signed-off-by: Junsu Shin --- drivers/staging/android/ion/ion.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/android/ion/ion.c b/drivers/staging/android/ion/ion.c index 6f48112..e44f5e6 100644 --- a/drivers/staging/android/ion/ion.c +++ b/drivers/staging/android/ion/ion.c @@ -1106,6 +1106,7 @@ struct dma_buf *ion_share_dma_buf(struct ion_client *client, struct ion_buffer *buffer; struct dma_buf *dmabuf; bool valid_handle; + DEFINE_DMA_BUF_EXPORT_INFO(exp_info); mutex_lock(&client->lock); -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: vme: devices: remove multiple blank lines
This is a patch to vm2_pio2_core.c that removes multiple blanks lines. Signed-off-by: Junsu Shin --- drivers/staging/vme/devices/vme_pio2_core.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/staging/vme/devices/vme_pio2_core.c b/drivers/staging/vme/devices/vme_pio2_core.c index eabbcc7..05b9067 100644 --- a/drivers/staging/vme/devices/vme_pio2_core.c +++ b/drivers/staging/vme/devices/vme_pio2_core.c @@ -24,7 +24,6 @@ #include "vme_pio2.h" - static const char driver_name[] = "pio2"; static int bus[PIO2_CARDS_MAX]; @@ -118,7 +117,6 @@ static void pio2_int(int level, int vector, void *ptr) } } - /* * We return whether this has been successful - this is used in the probe to * ensure we have a valid card. @@ -158,7 +156,6 @@ static struct vme_driver pio2_driver = { .remove = pio2_remove, }; - static int __init pio2_init(void) { if (bus_num == 0) { @@ -481,7 +478,6 @@ static void __exit pio2_exit(void) vme_unregister_driver(&pio2_driver); } - /* These are required for each board */ MODULE_PARM_DESC(bus, "Enumeration of VMEbus to which the board is connected"); module_param_array(bus, int, &bus_num, S_IRUGO); -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: vme: devices: remove blank line after open brace
This is a patch to the vme_pio2_core.c that removes blank line after open brace '{'. Signed-off-by: Junsu Shin --- drivers/staging/vme/devices/vme_pio2_core.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/vme/devices/vme_pio2_core.c b/drivers/staging/vme/devices/vme_pio2_core.c index 05b9067..767b2ef 100644 --- a/drivers/staging/vme/devices/vme_pio2_core.c +++ b/drivers/staging/vme/devices/vme_pio2_core.c @@ -175,7 +175,6 @@ static int __init pio2_init(void) static int pio2_match(struct vme_dev *vdev) { - if (vdev->num >= bus_num) { dev_err(&vdev->dev, "The enumeration of the VMEbus to which the board is connected must be specified\n"); @@ -231,7 +230,6 @@ static int pio2_probe(struct vme_dev *vdev) card->vdev = vdev; for (i = 0; i < PIO2_VARIANT_LENGTH; i++) { - if (isdigit(card->variant[i]) == 0) { dev_err(&card->vdev->dev, "Variant invalid\n"); retval = -EINVAL; -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: vme: devices: fix NULL comparison style
This is a patch to vme_pio2_core.c that fixes up the NULL comparison style. Signed-off-by: Junsu Shin --- drivers/staging/vme/devices/vme_pio2_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/vme/devices/vme_pio2_core.c b/drivers/staging/vme/devices/vme_pio2_core.c index 767b2ef..9341154 100644 --- a/drivers/staging/vme/devices/vme_pio2_core.c +++ b/drivers/staging/vme/devices/vme_pio2_core.c @@ -216,7 +216,7 @@ static int pio2_probe(struct vme_dev *vdev) int vec; card = kzalloc(sizeof(struct pio2_card), GFP_KERNEL); - if (card == NULL) { + if (!card) { retval = -ENOMEM; goto err_struct; } @@ -281,7 +281,7 @@ static int pio2_probe(struct vme_dev *vdev) /* Get a master window and position over regs */ card->window = vme_master_request(vdev, VME_A24, VME_SCT, VME_D16); - if (card->window == NULL) { + if (!card->window) { dev_err(&card->vdev->dev, "Unable to assign VME master resource\n"); retval = -EIO; -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: vme: devices: add spaces around '-'
This is a patch to the vme_pio2_core.c that adds spaces around '-'. Signed-off-by: Junsu Shin --- drivers/staging/vme/devices/vme_pio2_core.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/vme/devices/vme_pio2_core.c b/drivers/staging/vme/devices/vme_pio2_core.c index 9341154..35c6ce5 100644 --- a/drivers/staging/vme/devices/vme_pio2_core.c +++ b/drivers/staging/vme/devices/vme_pio2_core.c @@ -259,22 +259,22 @@ static int pio2_probe(struct vme_dev *vdev) for (i = 1; i < PIO2_VARIANT_LENGTH; i++) { switch (card->variant[i]) { case '0': - card->bank[i-1].config = NOFIT; + card->bank[i - 1].config = NOFIT; break; case '1': case '2': case '3': case '4': - card->bank[i-1].config = INPUT; + card->bank[i - 1].config = INPUT; break; case '5': - card->bank[i-1].config = OUTPUT; + card->bank[i - 1].config = OUTPUT; break; case '6': case '7': case '8': case '9': - card->bank[i-1].config = BOTH; + card->bank[i - 1].config = BOTH; break; } } -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel