Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1396327 > unrolled thread

[PATCH] Staging: android: gio: fixes a variable type issue and tabbing issues

Started byThimo Braker <thibmorozier@gmail.com>
First post2016-05-07 18:00 +0200
Last post2016-05-07 22:30 +0200
Articles 5 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] Staging: android: gio: fixes a variable type issue and tabbing issues Thimo Braker <thibmorozier@gmail.com> - 2016-05-07 18:00 +0200
    Re: [PATCH] Staging: android: gio: fixes a variable type issue and  tabbing issues Greg KH <gregkh@linuxfoundation.org> - 2016-05-07 19:20 +0200
      Re: [PATCH] Staging: android: gio: fixes a variable type issue and  tabbing issues Thimo Braker <thibmorozier@gmail.com> - 2016-05-07 20:10 +0200
        Re: [PATCH] Staging: android: gio: fixes a variable type issue and  tabbing issues Greg KH <gregkh@linuxfoundation.org> - 2016-05-07 21:10 +0200
          Re: [PATCH] Staging: android: gio: fixes a variable type issue and  tabbing issues Thimo Braker <thibmorozier@gmail.com> - 2016-05-07 22:30 +0200

#1396327 — [PATCH] Staging: android: gio: fixes a variable type issue and tabbing issues

FromThimo Braker <thibmorozier@gmail.com>
Date2016-05-07 18:00 +0200
Subject[PATCH] Staging: android: gio: fixes a variable type issue and tabbing issues
Message-ID<rwcO6-46p-15@gated-at.bofh.it>
Fixes issues with the coding style checks.

Signed-off-by: Thimo Braker <thibmorozier@hmail.com>
---
 drivers/staging/android/timed_gpio.c   | 36 +++++++++++++++++-----------------
 drivers/staging/android/timed_gpio.h   |  8 ++++----
 drivers/staging/android/timed_output.c | 16 +++++++--------
 3 files changed, 30 insertions(+), 30 deletions(-)

diff --git a/drivers/staging/android/timed_gpio.c b/drivers/staging/android/timed_gpio.c
index 914fd10..61fbed7 100644
--- a/drivers/staging/android/timed_gpio.c
+++ b/drivers/staging/android/timed_gpio.c
@@ -26,17 +26,17 @@
 #include "timed_gpio.h"
 
 struct timed_gpio_data {
-	struct timed_output_dev dev;
-	struct hrtimer timer;
-	spinlock_t lock;
-	unsigned gpio;
-	int max_timeout;
-	u8 active_low;
+	struct timed_output_dev	dev;
+	struct hrtimer		timer;
+	spinlock_t		lock;
+	unsigned int		gpio;
+	int			max_timeout;
+	u8			active_low;
 };
 
 static enum hrtimer_restart gpio_timer_func(struct hrtimer *timer)
 {
-	struct timed_gpio_data *data =
+	struct timed_gpio_data	*data =
 		container_of(timer, struct timed_gpio_data, timer);
 
 	gpio_direction_output(data->gpio, data->active_low ? 1 : 0);
@@ -45,8 +45,8 @@ static enum hrtimer_restart gpio_timer_func(struct hrtimer *timer)
 
 static int gpio_get_time(struct timed_output_dev *dev)
 {
-	struct timed_gpio_data *data;
-	ktime_t t;
+	struct timed_gpio_data	*data;
+	ktime_t			t;
 
 	data = container_of(dev, struct timed_gpio_data, dev);
 
@@ -60,9 +60,9 @@ static int gpio_get_time(struct timed_output_dev *dev)
 
 static void gpio_enable(struct timed_output_dev *dev, int value)
 {
-	struct timed_gpio_data *data =
+	struct timed_gpio_data	*data =
 		container_of(dev, struct timed_gpio_data, dev);
-	unsigned long flags;
+	unsigned long		flags;
 
 	spin_lock_irqsave(&data->lock, flags);
 
@@ -84,10 +84,10 @@ static void gpio_enable(struct timed_output_dev *dev, int value)
 
 static int timed_gpio_probe(struct platform_device *pdev)
 {
-	struct timed_gpio_platform_data *pdata = pdev->dev.platform_data;
-	struct timed_gpio *cur_gpio;
-	struct timed_gpio_data *gpio_data, *gpio_dat;
-	int i, ret;
+	struct timed_gpio_platform_data	*pdata = pdev->dev.platform_data;
+	struct timed_gpio		*cur_gpio;
+	struct timed_gpio_data		*gpio_data, *gpio_dat;
+	int				i, ret;
 
 	if (!pdata)
 		return -EBUSY;
@@ -139,9 +139,9 @@ err_out:
 
 static int timed_gpio_remove(struct platform_device *pdev)
 {
-	struct timed_gpio_platform_data *pdata = pdev->dev.platform_data;
-	struct timed_gpio_data *gpio_data = platform_get_drvdata(pdev);
-	int i;
+	struct timed_gpio_platform_data	*pdata = pdev->dev.platform_data;
+	struct timed_gpio_data		*gpio_data = platform_get_drvdata(pdev);
+	int				i;
 
 	for (i = 0; i < pdata->num_gpios; i++) {
 		timed_output_dev_unregister(&gpio_data[i].dev);
diff --git a/drivers/staging/android/timed_gpio.h b/drivers/staging/android/timed_gpio.h
index d29e169..2068c8f 100644
--- a/drivers/staging/android/timed_gpio.h
+++ b/drivers/staging/android/timed_gpio.h
@@ -19,15 +19,15 @@
 #define TIMED_GPIO_NAME "timed-gpio"
 
 struct timed_gpio {
-	const char *name;
-	unsigned	gpio;
+	const char	*name;
+	unsigned int	gpio;
 	int		max_timeout;
 	u8		active_low;
 };
 
 struct timed_gpio_platform_data {
-	int		num_gpios;
-	struct timed_gpio *gpios;
+	int			num_gpios;
+	struct timed_gpio	*gpios;
 };
 
 #endif
diff --git a/drivers/staging/android/timed_output.c b/drivers/staging/android/timed_output.c
index aff9cdb..05d9863 100644
--- a/drivers/staging/android/timed_output.c
+++ b/drivers/staging/android/timed_output.c
@@ -25,14 +25,14 @@
 
 #include "timed_output.h"
 
-static struct class *timed_output_class;
-static atomic_t device_count;
+static struct class	*timed_output_class;
+static atomic_t		device_count;
 
 static ssize_t enable_show(struct device *dev, struct device_attribute *attr,
 			   char *buf)
 {
-	struct timed_output_dev *tdev = dev_get_drvdata(dev);
-	int remaining = tdev->get_time(tdev);
+	struct timed_output_dev	*tdev = dev_get_drvdata(dev);
+	int			remaining = tdev->get_time(tdev);
 
 	return sprintf(buf, "%d\n", remaining);
 }
@@ -40,9 +40,9 @@ static ssize_t enable_show(struct device *dev, struct device_attribute *attr,
 static ssize_t enable_store(struct device *dev, struct device_attribute *attr,
 			    const char *buf, size_t size)
 {
-	struct timed_output_dev *tdev = dev_get_drvdata(dev);
-	int value;
-	int rc;
+	struct timed_output_dev	*tdev = dev_get_drvdata(dev);
+	int			value;
+	int			rc;
 
 	rc = kstrtoint(buf, 0, &value);
 	if (rc != 0)
@@ -75,7 +75,7 @@ static int create_timed_output_class(void)
 
 int timed_output_dev_register(struct timed_output_dev *tdev)
 {
-	int ret;
+	int	ret;
 
 	if (!tdev || !tdev->name || !tdev->enable || !tdev->get_time)
 		return -EINVAL;
-- 
2.1.4

[toc] | [next] | [standalone]


#1396330 — Re: [PATCH] Staging: android: gio: fixes a variable type issue and tabbing issues

FromGreg KH <gregkh@linuxfoundation.org>
Date2016-05-07 19:20 +0200
SubjectRe: [PATCH] Staging: android: gio: fixes a variable type issue and tabbing issues
Message-ID<rwe3v-5Gm-3@gated-at.bofh.it>
In reply to#1396327
On Sat, May 07, 2016 at 10:56:37AM -0500, Thimo Braker wrote:
> Fixes issues with the coding style checks.

What issues?  Always be specific, and describe what you are doing.  Also
don't put more than one "thing" in a single patch (hint, "coding style
cleanups" are not one thing.)

> 
> Signed-off-by: Thimo Braker <thibmorozier@hmail.com>
> ---
>  drivers/staging/android/timed_gpio.c   | 36 +++++++++++++++++-----------------
>  drivers/staging/android/timed_gpio.h   |  8 ++++----
>  drivers/staging/android/timed_output.c | 16 +++++++--------

These files are not in linux-next, please always work from that, they
have been gone from my tree for months now :(

thanks,

greg k-h

[toc] | [prev] | [next] | [standalone]


#1396340 — Re: [PATCH] Staging: android: gio: fixes a variable type issue and tabbing issues

FromThimo Braker <thibmorozier@gmail.com>
Date2016-05-07 20:10 +0200
SubjectRe: [PATCH] Staging: android: gio: fixes a variable type issue and tabbing issues
Message-ID<rwePU-6s5-13@gated-at.bofh.it>
In reply to#1396330
Thanks for the reply.
Will give that a check. :)
Got pointed to torvalds/linux-2.6 by some other guy.

Will have a look in the other repo.
Also, would you rather have me send a patch for every type (eg tabbing 
fix, capital fix, spelling fix, 80-char fix, etc)? (Just to be sure I 
properly understood you.)


Thanks,

Thimo B.


On 7-5-2016 19:15, Greg KH wrote:
> On Sat, May 07, 2016 at 10:56:37AM -0500, Thimo Braker wrote:
>> Fixes issues with the coding style checks.
> What issues?  Always be specific, and describe what you are doing.  Also
> don't put more than one "thing" in a single patch (hint, "coding style
> cleanups" are not one thing.)
>
>> Signed-off-by: Thimo Braker <thibmorozier@hmail.com>
>> ---
>>   drivers/staging/android/timed_gpio.c   | 36 +++++++++++++++++-----------------
>>   drivers/staging/android/timed_gpio.h   |  8 ++++----
>>   drivers/staging/android/timed_output.c | 16 +++++++--------
> These files are not in linux-next, please always work from that, they
> have been gone from my tree for months now :(
>
> thanks,
>
> greg k-h

[toc] | [prev] | [next] | [standalone]


#1396346 — Re: [PATCH] Staging: android: gio: fixes a variable type issue and tabbing issues

FromGreg KH <gregkh@linuxfoundation.org>
Date2016-05-07 21:10 +0200
SubjectRe: [PATCH] Staging: android: gio: fixes a variable type issue and tabbing issues
Message-ID<rwfLY-7of-7@gated-at.bofh.it>
In reply to#1396340
A: No.
Q: Should I include quotations after my reply?

http://daringfireball.net/2007/07/on_top

On Sat, May 07, 2016 at 08:05:22PM +0200, Thimo Braker wrote:
> Thanks for the reply.
> Will give that a check. :)
> Got pointed to torvalds/linux-2.6 by some other guy.
> 
> Will have a look in the other repo.
> Also, would you rather have me send a patch for every type (eg tabbing fix,
> capital fix, spelling fix, 80-char fix, etc)? (Just to be sure I properly
> understood you.)

Yes, a patch should only do one thing.  Look at the patches sent the
driverdevel mailing list for examples of this.

thanks,

greg kh

[toc] | [prev] | [next] | [standalone]


#1396361 — Re: [PATCH] Staging: android: gio: fixes a variable type issue and tabbing issues

FromThimo Braker <thibmorozier@gmail.com>
Date2016-05-07 22:30 +0200
SubjectRe: [PATCH] Staging: android: gio: fixes a variable type issue and tabbing issues
Message-ID<rwh1o-8vq-13@gated-at.bofh.it>
In reply to#1396346
> Q: Should I include quotations after my reply?

Sorry about that, will do.

> Look at the patches sent the driverdevel mailing list for examples of this.

Just subscribed to that mailing list, will keep an eye out for proper patch mails.

Thanks,

Thimo B.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web