Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1547930 > unrolled thread
| Started by | Chanwoo Choi <cw00.choi@samsung.com> |
|---|---|
| First post | 2016-12-28 13:00 +0100 |
| Last post | 2016-12-30 11:40 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH v2 5/8] PM / devfreq: Fix the checkpatch warnings Chanwoo Choi <cw00.choi@samsung.com> - 2016-12-28 13:00 +0100
Re: [PATCH v2 5/8] PM / devfreq: Fix the checkpatch warnings MyungJoo Ham <myungjoo.ham@samsung.com> - 2016-12-30 11:40 +0100
| From | Chanwoo Choi <cw00.choi@samsung.com> |
|---|---|
| Date | 2016-12-28 13:00 +0100 |
| Subject | [PATCH v2 5/8] PM / devfreq: Fix the checkpatch warnings |
| Message-ID | <sTl3I-7Id-35@gated-at.bofh.it> |
This patch just fixes the checkpatch warnings.
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
---
drivers/devfreq/devfreq.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
index 47206a21bb90..8e5938c9c7d6 100644
--- a/drivers/devfreq/devfreq.c
+++ b/drivers/devfreq/devfreq.c
@@ -538,15 +538,14 @@ struct devfreq *devfreq_add_device(struct device *dev,
devfreq = find_device_devfreq(dev);
mutex_unlock(&devfreq_list_lock);
if (!IS_ERR(devfreq)) {
- dev_err(dev, "%s: Unable to create devfreq for the device. It already has one.\n", __func__);
+ dev_err(dev, "%s: Unable to create devfreq for the device.\n",
+ __func__);
err = -EINVAL;
goto err_out;
}
devfreq = kzalloc(sizeof(struct devfreq), GFP_KERNEL);
if (!devfreq) {
- dev_err(dev, "%s: Unable to create devfreq for the device\n",
- __func__);
err = -ENOMEM;
goto err_out;
}
@@ -576,11 +575,13 @@ struct devfreq *devfreq_add_device(struct device *dev,
goto err_out;
}
- devfreq->trans_table = devm_kzalloc(&devfreq->dev, sizeof(unsigned int) *
+ devfreq->trans_table = devm_kzalloc(&devfreq->dev,
+ sizeof(unsigned int) *
devfreq->profile->max_state *
devfreq->profile->max_state,
GFP_KERNEL);
- devfreq->time_in_state = devm_kzalloc(&devfreq->dev, sizeof(unsigned long) *
+ devfreq->time_in_state = devm_kzalloc(&devfreq->dev,
+ sizeof(unsigned long) *
devfreq->profile->max_state,
GFP_KERNEL);
devfreq->last_stat_updated = jiffies;
@@ -995,7 +996,7 @@ static ssize_t cur_freq_show(struct device *dev, struct device_attribute *attr,
if (devfreq->profile->get_cur_freq &&
!devfreq->profile->get_cur_freq(devfreq->dev.parent, &freq))
- return sprintf(buf, "%lu\n", freq);
+ return sprintf(buf, "%lu\n", freq);
return sprintf(buf, "%lu\n", devfreq->previous_freq);
}
--
1.9.1
[toc] | [next] | [standalone]
| From | MyungJoo Ham <myungjoo.ham@samsung.com> |
|---|---|
| Date | 2016-12-30 11:40 +0100 |
| Message-ID | <sU2Lo-39f-15@gated-at.bofh.it> |
| In reply to | #1547930 |
On Wed, Dec 28, 2016 at 8:56 PM, Chanwoo Choi <cw00.choi@samsung.com> wrote:
> This patch just fixes the checkpatch warnings.
>
> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
> ---
> drivers/devfreq/devfreq.c | 13 +++++++------
> 1 file changed, 7 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
> index 47206a21bb90..8e5938c9c7d6 100644
> --- a/drivers/devfreq/devfreq.c
> +++ b/drivers/devfreq/devfreq.c
> @@ -538,15 +538,14 @@ struct devfreq *devfreq_add_device(struct device *dev,
> devfreq = find_device_devfreq(dev);
> mutex_unlock(&devfreq_list_lock);
> if (!IS_ERR(devfreq)) {
> - dev_err(dev, "%s: Unable to create devfreq for the device. It already has one.\n", __func__);
> + dev_err(dev, "%s: Unable to create devfreq for the device.\n",
> + __func__);
Actually, you do not need to try to keep it under 80col for printing strings.
Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com>
> err = -EINVAL;
> goto err_out;
> }
>
> devfreq = kzalloc(sizeof(struct devfreq), GFP_KERNEL);
> if (!devfreq) {
> - dev_err(dev, "%s: Unable to create devfreq for the device\n",
> - __func__);
> err = -ENOMEM;
> goto err_out;
> }
--
MyungJoo Ham, Ph.D.
S/W Center, Samsung Electronics
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web