All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 5/7] staging: cxt1e1: fix checkpatch errors with open brace '{'
@ 2014-03-04  2:10 Daeseok Youn
  2014-03-05  0:35 ` Greg KH
  0 siblings, 1 reply; 5+ messages in thread
From: Daeseok Youn @ 2014-03-04  2:10 UTC (permalink / raw)
  To: gregkh
  Cc: shaun, sachin.kamat, davem, dulshani.gunawardhana89, ying.xue,
	devel, linux-kernel


clean up checkpatch.pl error in linux.c:
 ERROR: that open brace { should be on the previous line

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
---
 drivers/staging/cxt1e1/linux.c |   67 ++++++++++++---------------------------
 1 files changed, 21 insertions(+), 46 deletions(-)

diff --git a/drivers/staging/cxt1e1/linux.c b/drivers/staging/cxt1e1/linux.c
index cade004..7eb6625 100644
--- a/drivers/staging/cxt1e1/linux.c
+++ b/drivers/staging/cxt1e1/linux.c
@@ -242,8 +242,7 @@ c4_wq_port_cleanup(mpi_t *pi)
 	 * PORT POINT: cannot call this if WQ is statically allocated w/in
 	 * structure since it calls kfree(wq);
 	 */
-	if (pi->wq_port)
-	{
+	if (pi->wq_port) {
 		destroy_workqueue(pi->wq_port);        /* this also calls
 							* flush_workqueue() */
 		pi->wq_port = NULL;
@@ -433,15 +432,13 @@ create_chan(struct net_device *ndev, ci_t *ci,
 
 		/* allocate then fill in private data structure */
 		priv = OS_kmalloc(sizeof(struct c4_priv));
-		if (!priv)
-		{
+		if (!priv) {
 			pr_warning("%s: no memory for net_device !\n",
 				   ci->devname);
 			return NULL;
 		}
 		dev = alloc_hdlcdev(priv);
-		if (!dev)
-		{
+		if (!dev) {
 			pr_warning("%s: no memory for hdlc_device !\n",
 				   ci->devname);
 			OS_kfree(priv);
@@ -459,10 +456,8 @@ create_chan(struct net_device *ndev, ci_t *ci,
 	*dev->name = 0;                 /* default ifconfig name = "hdlc" */
 
 	hi = (hdw_info_t *)ci->hdw_info;
-	if (hi->mfg_info_sts == EEPROM_OK)
-	{
-		switch (hi->promfmt)
-		{
+	if (hi->mfg_info_sts == EEPROM_OK) {
+		switch (hi->promfmt) {
 		case PROM_FORMAT_TYPE1:
 			memcpy(dev->dev_addr,
 			       (FLD_TYPE1 *) (hi->mfg_info.pft1.Serial), 6);
@@ -476,9 +471,7 @@ create_chan(struct net_device *ndev, ci_t *ci,
 			break;
 		}
 	} else
-	{
 		memset(dev->dev_addr, 0, 6);
-	}
 
 	hdlc->xmit = c4_linux_xmit;
 
@@ -502,8 +495,7 @@ create_chan(struct net_device *ndev, ci_t *ci,
 
 	/* needed due to Ioctl calling sequence */
 	rtnl_lock();
-	if (ret)
-	{
+	if (ret) {
 		if (cxt1e1_log_level >= LOG_WARN)
 			pr_info("%s: create_chan[%d] registration error = %d.\n",
 				ci->devname, cp->channum, ret);
@@ -698,8 +690,7 @@ do_create_chan(struct net_device *ndev, void *data)
 	if (!dev)
 		return -EBUSY;
 	ret = mkret(c4_new_chan(ci, cp.port, cp.channum, dev));
-	if (ret)
-	{
+	if (ret) {
 		/* needed due to Ioctl calling sequence */
 		rtnl_unlock();
 		unregister_hdlc_device(dev);
@@ -805,8 +796,7 @@ do_reset(struct net_device *musycc_dev, void *data)
 	const struct c4_priv *priv;
 	int         i;
 
-	for (i = 0; i < 128; i++)
-	{
+	for (i = 0; i < 128; i++) {
 		struct net_device *ndev;
 		char        buf[sizeof(CHANNAME) + 3];
 
@@ -817,8 +807,7 @@ do_reset(struct net_device *musycc_dev, void *data)
 		priv = dev_to_hdlc(ndev)->priv;
 
 		if ((unsigned long) (priv->ci) ==
-			(unsigned long) (netdev_priv(musycc_dev)))
-		{
+			(unsigned long) (netdev_priv(musycc_dev))) {
 			ndev->flags &= ~IFF_UP;
 			netif_stop_queue(ndev);
 			do_deluser(ndev, 1);
@@ -845,10 +834,8 @@ c4_ioctl(struct net_device *ndev, struct ifreq *ifr, int cmd)
 	void       *data;
 	int         iocmd, iolen;
 	status_t    ret;
-	static struct data
-	{
-		union
-		{
+	static struct data {
+		union {
 			u_int8_t c;
 			u_int32_t i;
 			struct sbe_brd_info bip;
@@ -891,8 +878,7 @@ c4_ioctl(struct net_device *ndev, struct ifreq *ifr, int cmd)
 		return -EFAULT;
 
 	ret = 0;
-	switch (iocmd)
-	{
+	switch (iocmd) {
 	case SBE_IOC_PORT_GET:
 		//pr_info(">> SBE_IOC_PORT_GET Ioctl...\n");
 		ret = do_get_port(ndev, data);
@@ -975,8 +961,7 @@ c4_add_dev(hdw_info_t *hi, int brdno, unsigned long f0, unsigned long f1,
 	ci_t       *ci;
 
 	ndev = alloc_netdev(sizeof(ci_t), SBE_IFACETMPL, c4_setup);
-	if (!ndev)
-	{
+	if (!ndev) {
 		pr_warning("%s: no memory for struct net_device !\n",
 			   hi->devname);
 		error_flag = ENOMEM;
@@ -1012,8 +997,7 @@ c4_add_dev(hdw_info_t *hi, int brdno, unsigned long f0, unsigned long f1,
 
 
 	if (register_netdev(ndev) ||
-		(c4_init(ci, (u_char *) f0, (u_char *) f1) != SBE_DRVR_SUCCESS))
-	{
+		(c4_init(ci, (u_char *) f0, (u_char *) f1) != SBE_DRVR_SUCCESS)) {
 		OS_kfree(netdev_priv(ndev));
 		OS_kfree(ndev);
 		error_flag = ENODEV;
@@ -1036,8 +1020,7 @@ c4_add_dev(hdw_info_t *hi, int brdno, unsigned long f0, unsigned long f1,
 
 	if (request_irq(irq0, &c4_linux_interrupt,
 			IRQF_SHARED,
-			ndev->name, ndev))
-	{
+			ndev->name, ndev)) {
 		pr_warning("%s: MUSYCC could not get irq: %d\n",
 			   ndev->name, irq0);
 		unregister_netdev(ndev);
@@ -1047,8 +1030,7 @@ c4_add_dev(hdw_info_t *hi, int brdno, unsigned long f0, unsigned long f1,
 		return NULL;
 	}
 #ifdef CONFIG_SBE_PMCC4_NCOMM
-	if (request_irq(irq1, &c4_ebus_interrupt, IRQF_SHARED, ndev->name, ndev))
-	{
+	if (request_irq(irq1, &c4_ebus_interrupt, IRQF_SHARED, ndev->name, ndev)) {
 		pr_warning("%s: EBUS could not get irq: %d\n", hi->devname, irq1);
 		unregister_netdev(ndev);
 		free_irq(irq0, ndev);
@@ -1067,8 +1049,7 @@ c4_add_dev(hdw_info_t *hi, int brdno, unsigned long f0, unsigned long f1,
 		/* also sets PROM format type (promfmt) for later usage */
 		hdw_sn_get(hi, brdno);
 
-		switch (hi->promfmt)
-		{
+		switch (hi->promfmt) {
 		case PROM_FORMAT_TYPE1:
 			memcpy(ndev->dev_addr,
 			       (FLD_TYPE1 *) (hi->mfg_info.pft1.Serial), 6);
@@ -1141,15 +1122,13 @@ c4_mod_init(void)
 	if (cxt1e1_max_mtu != max_mtu_default)
 		pr_info("NOTE: driver parameter <cxt1e1_max_mtu> changed from default %d to %d.\n",
 			max_mtu_default, cxt1e1_max_mtu);
-	if (max_rxdesc_used != max_rxdesc_default)
-	{
+	if (max_rxdesc_used != max_rxdesc_default) {
 		if (max_rxdesc_used > 2000)
 			max_rxdesc_used = 2000; /* out-of-bounds reset */
 		pr_info("NOTE: driver parameter <max_rxdesc_used> changed from default %d to %d.\n",
 			max_rxdesc_default, max_rxdesc_used);
 	}
-	if (max_txdesc_used != max_txdesc_default)
-	{
+	if (max_txdesc_used != max_txdesc_default) {
 		if (max_txdesc_used > 1000)
 			max_txdesc_used = 1000; /* out-of-bounds reset */
 		pr_info("NOTE: driver parameter <max_txdesc_used> changed from default %d to %d.\n",
@@ -1172,18 +1151,14 @@ cleanup_hdlc(void)
 	struct net_device *ndev;
 	int         i, j, k;
 
-	for (i = 0, hi = hdw_info; i < MAX_BOARDS; i++, hi++)
-	{
-		if (hi->ndev)               /* a board has been attached */
-		{
+	for (i = 0, hi = hdw_info; i < MAX_BOARDS; i++, hi++) {
+		if (hi->ndev) {          /* a board has been attached */
 			ci = (ci_t *)(netdev_priv(hi->ndev));
 			for (j = 0; j < ci->max_port; j++)
 				for (k = 0; k < MUSYCC_NCHANS; k++)
 					ndev = ci->port[j].chan[k]->user;
 					if (ndev)
-					{
 						do_deluser(ndev, 0);
-					}
 		}
 	}
 }
-- 
1.7.4.4



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 5/7] staging: cxt1e1: fix checkpatch errors with open brace '{'
  2014-03-04  2:10 [PATCH 5/7] staging: cxt1e1: fix checkpatch errors with open brace '{' Daeseok Youn
@ 2014-03-05  0:35 ` Greg KH
  2014-03-05  0:55   ` DaeSeok Youn
  0 siblings, 1 reply; 5+ messages in thread
From: Greg KH @ 2014-03-05  0:35 UTC (permalink / raw)
  To: Daeseok Youn
  Cc: devel, shaun, sachin.kamat, linux-kernel,
	dulshani.gunawardhana89, ying.xue, davem

On Tue, Mar 04, 2014 at 11:10:44AM +0900, Daeseok Youn wrote:
> 
> clean up checkpatch.pl error in linux.c:
>  ERROR: that open brace { should be on the previous line
> 
> Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
> ---
>  drivers/staging/cxt1e1/linux.c |   67 ++++++++++++---------------------------
>  1 files changed, 21 insertions(+), 46 deletions(-)

As patch 4 can't be applied, I can't apply these either, please resend
the rest of the series when you fix them up.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 5/7] staging: cxt1e1: fix checkpatch errors with open brace '{'
  2014-03-05  0:35 ` Greg KH
@ 2014-03-05  0:55   ` DaeSeok Youn
  2014-03-05  1:06     ` Greg KH
  0 siblings, 1 reply; 5+ messages in thread
From: DaeSeok Youn @ 2014-03-05  0:55 UTC (permalink / raw)
  To: Greg KH
  Cc: devel, Shaun Laing, sachin.kamat, linux-kernel,
	Dulshani Gunawardhana, ying.xue, David Miller, Dan Carpenter

Hi, greg

I already resend patch 4 and 5. :-)

It had a bug which is noticed by Dan.

I tried to fix assignment in if condition and missed curly brace in inner loop.
So I fixed that bug and resend patch 4. And patch 5 is rebased after
fixing patch 4.

And I tested to apply these patch to staging-next branch from mailing list.
Please check.

Thanks.
Daeseok Youn.

2014-03-05 9:35 GMT+09:00 Greg KH <gregkh@linuxfoundation.org>:
> On Tue, Mar 04, 2014 at 11:10:44AM +0900, Daeseok Youn wrote:
>>
>> clean up checkpatch.pl error in linux.c:
>>  ERROR: that open brace { should be on the previous line
>>
>> Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
>> ---
>>  drivers/staging/cxt1e1/linux.c |   67 ++++++++++++---------------------------
>>  1 files changed, 21 insertions(+), 46 deletions(-)
>
> As patch 4 can't be applied, I can't apply these either, please resend
> the rest of the series when you fix them up.
>
> thanks,
>
> greg k-h

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 5/7] staging: cxt1e1: fix checkpatch errors with open brace '{'
  2014-03-05  0:55   ` DaeSeok Youn
@ 2014-03-05  1:06     ` Greg KH
  2014-03-05  1:16       ` DaeSeok Youn
  0 siblings, 1 reply; 5+ messages in thread
From: Greg KH @ 2014-03-05  1:06 UTC (permalink / raw)
  To: DaeSeok Youn
  Cc: devel, Shaun Laing, sachin.kamat, linux-kernel,
	Dulshani Gunawardhana, ying.xue, David Miller, Dan Carpenter

On Wed, Mar 05, 2014 at 09:55:14AM +0900, DaeSeok Youn wrote:
> Hi, greg
> 
> I already resend patch 4 and 5. :-)
> 
> It had a bug which is noticed by Dan.
> 
> I tried to fix assignment in if condition and missed curly brace in inner loop.
> So I fixed that bug and resend patch 4. And patch 5 is rebased after
> fixing patch 4.
> 
> And I tested to apply these patch to staging-next branch from mailing list.
> Please check.

I've flushed all of your patches from my queue now, please resend
anything I haven't applied.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 5/7] staging: cxt1e1: fix checkpatch errors with open brace '{'
  2014-03-05  1:06     ` Greg KH
@ 2014-03-05  1:16       ` DaeSeok Youn
  0 siblings, 0 replies; 5+ messages in thread
From: DaeSeok Youn @ 2014-03-05  1:16 UTC (permalink / raw)
  To: Greg KH
  Cc: devel, Shaun Laing, sachin.kamat, linux-kernel,
	Dulshani Gunawardhana, ying.xue, David Miller, Dan Carpenter

OK.
I send patches again.

Thanks.
Daeseok Youn.

2014-03-05 10:06 GMT+09:00 Greg KH <gregkh@linuxfoundation.org>:
> On Wed, Mar 05, 2014 at 09:55:14AM +0900, DaeSeok Youn wrote:
>> Hi, greg
>>
>> I already resend patch 4 and 5. :-)
>>
>> It had a bug which is noticed by Dan.
>>
>> I tried to fix assignment in if condition and missed curly brace in inner loop.
>> So I fixed that bug and resend patch 4. And patch 5 is rebased after
>> fixing patch 4.
>>
>> And I tested to apply these patch to staging-next branch from mailing list.
>> Please check.
>
> I've flushed all of your patches from my queue now, please resend
> anything I haven't applied.
>
> thanks,
>
> greg k-h

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-03-05  1:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-04  2:10 [PATCH 5/7] staging: cxt1e1: fix checkpatch errors with open brace '{' Daeseok Youn
2014-03-05  0:35 ` Greg KH
2014-03-05  0:55   ` DaeSeok Youn
2014-03-05  1:06     ` Greg KH
2014-03-05  1:16       ` DaeSeok Youn

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.