* [PATCH] Staging: android: gio: fixes a variable type issue and tabbing issues
@ 2016-05-07 15:56 Thimo Braker
2016-05-07 17:15 ` Greg KH
0 siblings, 1 reply; 5+ messages in thread
From: Thimo Braker @ 2016-05-07 15:56 UTC (permalink / raw)
To: gregkh; +Cc: arve, riandrews, devel, linux-kernel, Thimo Braker, Thimo Braker
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
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] Staging: android: gio: fixes a variable type issue and tabbing issues
2016-05-07 15:56 [PATCH] Staging: android: gio: fixes a variable type issue and tabbing issues Thimo Braker
@ 2016-05-07 17:15 ` Greg KH
2016-05-07 18:05 ` Thimo Braker
0 siblings, 1 reply; 5+ messages in thread
From: Greg KH @ 2016-05-07 17:15 UTC (permalink / raw)
To: Thimo Braker; +Cc: arve, riandrews, devel, linux-kernel, Thimo Braker
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Staging: android: gio: fixes a variable type issue and tabbing issues
2016-05-07 17:15 ` Greg KH
@ 2016-05-07 18:05 ` Thimo Braker
2016-05-07 19:01 ` Greg KH
0 siblings, 1 reply; 5+ messages in thread
From: Thimo Braker @ 2016-05-07 18:05 UTC (permalink / raw)
To: Greg KH; +Cc: arve, riandrews, devel, linux-kernel
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Staging: android: gio: fixes a variable type issue and tabbing issues
2016-05-07 18:05 ` Thimo Braker
@ 2016-05-07 19:01 ` Greg KH
2016-05-07 20:24 ` Thimo Braker
0 siblings, 1 reply; 5+ messages in thread
From: Greg KH @ 2016-05-07 19:01 UTC (permalink / raw)
To: Thimo Braker; +Cc: arve, riandrews, devel, linux-kernel
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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-05-07 20:24 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-07 15:56 [PATCH] Staging: android: gio: fixes a variable type issue and tabbing issues Thimo Braker
2016-05-07 17:15 ` Greg KH
2016-05-07 18:05 ` Thimo Braker
2016-05-07 19:01 ` Greg KH
2016-05-07 20:24 ` Thimo Braker
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox