* [PATCH v3 0/5] staging: bcm2835-audio: fix multiple checkpatch warnings
@ 2017-03-02 17:55 Aishwarya Pant
2017-03-02 17:56 ` [PATCH v3 1/5] staging: bcm2835-camera: fix no space is necessary after a cast warning Aishwarya Pant
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: Aishwarya Pant @ 2017-03-02 17:55 UTC (permalink / raw)
To: Stephen Warren, Lee Jones, Eric Anholt, Greg Kroah-Hartman,
Florian Fainelli, Ray Jui, Scott Branden,
bcm-kernel-feedback-list
Cc: outreachy-kernel
Fix multiple code styling warnings issued by checkpatch on file
bcm2835-ctl.c in bcm2835-audio driver
Changes in v3:
-Merge two if conditions
-Fix subject of patch replace printk(... by dev_err(...
Changes in v2:
-Replace pr_err with dev_err
Aishwarya Pant (5):
*** HERE ***
staging: bcm2835-camera: fix no space is necessary after a cast
warning
staging: bcm2835-camera: Logical continuations should be on the
previous line
staging: bcm2835-camera: fix block comment formatting
staging: bcm2835-camera: remove extra blank line
staging: bcm2835-camera: replace printk(KERN_ERR) with dev_err
.../vc04_services/bcm2835-audio/bcm2835-ctl.c | 23 ++++++++++------------
1 file changed, 10 insertions(+), 13 deletions(-)
--
2.7.4
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v3 1/5] staging: bcm2835-camera: fix no space is necessary after a cast warning
2017-03-02 17:55 [PATCH v3 0/5] staging: bcm2835-audio: fix multiple checkpatch warnings Aishwarya Pant
@ 2017-03-02 17:56 ` Aishwarya Pant
2017-03-02 17:56 ` [PATCH v3 2/5] staging: bcm2835-camera: Logical continuations should be on the previous line Aishwarya Pant
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Aishwarya Pant @ 2017-03-02 17:56 UTC (permalink / raw)
To: Stephen Warren, Lee Jones, Eric Anholt, Greg Kroah-Hartman,
Florian Fainelli, Ray Jui, Scott Branden,
bcm-kernel-feedback-list
Cc: outreachy-kernel
Remove instances of unnecessary blank space after cast in bcm2835-ctl.c
Signed-off-by: Aishwarya Pant <aishpant@gmail.com>
---
drivers/staging/vc04_services/bcm2835-audio/bcm2835-ctl.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-ctl.c b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-ctl.c
index a4ffa1b..99e9ca3 100644
--- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-ctl.c
+++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-ctl.c
@@ -116,7 +116,7 @@ static int snd_bcm2835_ctl_put(struct snd_kcontrol *kcontrol,
return -EINTR;
if (kcontrol->private_value == PCM_PLAYBACK_VOLUME) {
- audio_info("Volume change attempted.. volume = %d new_volume = %d\n", chip->volume, (int) ucontrol->value.integer.value[0]);
+ audio_info("Volume change attempted.. volume = %d new_volume = %d\n", chip->volume, (int)ucontrol->value.integer.value[0]);
if (chip->mute == CTRL_VOL_MUTE) {
/* changed = toggle_mute(chip, CTRL_VOL_UNMUTE); */
changed = 1; /* should return 0 to signify no change but the mixer takes this as the opposite sign (no idea why) */
@@ -226,7 +226,7 @@ static int snd_bcm2835_spdif_default_put(struct snd_kcontrol *kcontrol,
return -EINTR;
for (i = 0; i < 4; i++)
- val |= (unsigned int) ucontrol->value.iec958.status[i] << (i * 8);
+ val |= (unsigned int)ucontrol->value.iec958.status[i] << (i * 8);
change = val != chip->spdif_status;
chip->spdif_status = val;
@@ -289,7 +289,7 @@ static int snd_bcm2835_spdif_stream_put(struct snd_kcontrol *kcontrol,
return -EINTR;
for (i = 0; i < 4; i++)
- val |= (unsigned int) ucontrol->value.iec958.status[i] << (i * 8);
+ val |= (unsigned int)ucontrol->value.iec958.status[i] << (i * 8);
change = val != chip->spdif_status;
chip->spdif_status = val;
--
2.7.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v3 2/5] staging: bcm2835-camera: Logical continuations should be on the previous line
2017-03-02 17:55 [PATCH v3 0/5] staging: bcm2835-audio: fix multiple checkpatch warnings Aishwarya Pant
2017-03-02 17:56 ` [PATCH v3 1/5] staging: bcm2835-camera: fix no space is necessary after a cast warning Aishwarya Pant
@ 2017-03-02 17:56 ` Aishwarya Pant
2017-03-02 17:56 ` [PATCH v3 3/5] staging: bcm2835-camera: fix block comment formatting Aishwarya Pant
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Aishwarya Pant @ 2017-03-02 17:56 UTC (permalink / raw)
To: Stephen Warren, Lee Jones, Eric Anholt, Greg Kroah-Hartman,
Florian Fainelli, Ray Jui, Scott Branden,
bcm-kernel-feedback-list
Cc: outreachy-kernel
Keep logical continuations on the same line to improve code readability
Signed-off-by: Aishwarya Pant <aishpant@gmail.com>
---
drivers/staging/vc04_services/bcm2835-audio/bcm2835-ctl.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-ctl.c b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-ctl.c
index 99e9ca3..17d34c0 100644
--- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-ctl.c
+++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-ctl.c
@@ -122,8 +122,7 @@ static int snd_bcm2835_ctl_put(struct snd_kcontrol *kcontrol,
changed = 1; /* should return 0 to signify no change but the mixer takes this as the opposite sign (no idea why) */
goto unlock;
}
- if (changed
- || (ucontrol->value.integer.value[0] != chip2alsa(chip->volume))) {
+ if (changed || (ucontrol->value.integer.value[0] != chip2alsa(chip->volume))) {
chip->volume = alsa2chip(ucontrol->value.integer.value[0]);
changed = 1;
--
2.7.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v3 3/5] staging: bcm2835-camera: fix block comment formatting
2017-03-02 17:55 [PATCH v3 0/5] staging: bcm2835-audio: fix multiple checkpatch warnings Aishwarya Pant
2017-03-02 17:56 ` [PATCH v3 1/5] staging: bcm2835-camera: fix no space is necessary after a cast warning Aishwarya Pant
2017-03-02 17:56 ` [PATCH v3 2/5] staging: bcm2835-camera: Logical continuations should be on the previous line Aishwarya Pant
@ 2017-03-02 17:56 ` Aishwarya Pant
2017-03-02 17:56 ` [PATCH v3 4/5] staging: bcm2835-camera: remove extra blank line Aishwarya Pant
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Aishwarya Pant @ 2017-03-02 17:56 UTC (permalink / raw)
To: Stephen Warren, Lee Jones, Eric Anholt, Greg Kroah-Hartman,
Florian Fainelli, Ray Jui, Scott Branden,
bcm-kernel-feedback-list
Cc: outreachy-kernel
Fix block comment formatting to suppress the following warning thrown by
checkpatch: Block comments use a trailing */ on a separate line
Signed-off-by: Aishwarya Pant <aishpant@gmail.com>
---
drivers/staging/vc04_services/bcm2835-audio/bcm2835-ctl.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-ctl.c b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-ctl.c
index 17d34c0..80b2062 100644
--- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-ctl.c
+++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-ctl.c
@@ -245,9 +245,10 @@ static int snd_bcm2835_spdif_mask_info(struct snd_kcontrol *kcontrol,
static int snd_bcm2835_spdif_mask_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
- /* bcm2835 supports only consumer mode and sets all other format flags
- * automatically. So the only thing left is signalling non-audio
- * content */
+ /*
+ * bcm2835 supports only consumer mode and sets all other format flags
+ * automatically. So the only thing left is signalling non-audio content
+ */
ucontrol->value.iec958.status[0] = IEC958_AES0_NONAUDIO;
return 0;
}
--
2.7.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v3 4/5] staging: bcm2835-camera: remove extra blank line
2017-03-02 17:55 [PATCH v3 0/5] staging: bcm2835-audio: fix multiple checkpatch warnings Aishwarya Pant
` (2 preceding siblings ...)
2017-03-02 17:56 ` [PATCH v3 3/5] staging: bcm2835-camera: fix block comment formatting Aishwarya Pant
@ 2017-03-02 17:56 ` Aishwarya Pant
2017-03-02 17:57 ` [PATCH v3 5/5] staging: bcm2835-camera: replace printk(KERN_ERR) with dev_err Aishwarya Pant
2017-03-02 18:09 ` [Outreachy kernel] [PATCH v3 0/5] staging: bcm2835-audio: fix multiple checkpatch warnings Alison Schofield
5 siblings, 0 replies; 7+ messages in thread
From: Aishwarya Pant @ 2017-03-02 17:56 UTC (permalink / raw)
To: Stephen Warren, Lee Jones, Eric Anholt, Greg Kroah-Hartman,
Florian Fainelli, Ray Jui, Scott Branden,
bcm-kernel-feedback-list
Cc: outreachy-kernel
Fix the warning: Blank lines aren't necessary after an open brace
'{' issued by checkpatch on bcm2835-ctl.c
Signed-off-by: Aishwarya Pant <aishpant@gmail.com>
---
drivers/staging/vc04_services/bcm2835-audio/bcm2835-ctl.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-ctl.c b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-ctl.c
index 80b2062..46814fd 100644
--- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-ctl.c
+++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-ctl.c
@@ -123,7 +123,6 @@ static int snd_bcm2835_ctl_put(struct snd_kcontrol *kcontrol,
goto unlock;
}
if (changed || (ucontrol->value.integer.value[0] != chip2alsa(chip->volume))) {
-
chip->volume = alsa2chip(ucontrol->value.integer.value[0]);
changed = 1;
}
--
2.7.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v3 5/5] staging: bcm2835-camera: replace printk(KERN_ERR) with dev_err
2017-03-02 17:55 [PATCH v3 0/5] staging: bcm2835-audio: fix multiple checkpatch warnings Aishwarya Pant
` (3 preceding siblings ...)
2017-03-02 17:56 ` [PATCH v3 4/5] staging: bcm2835-camera: remove extra blank line Aishwarya Pant
@ 2017-03-02 17:57 ` Aishwarya Pant
2017-03-02 18:09 ` [Outreachy kernel] [PATCH v3 0/5] staging: bcm2835-audio: fix multiple checkpatch warnings Alison Schofield
5 siblings, 0 replies; 7+ messages in thread
From: Aishwarya Pant @ 2017-03-02 17:57 UTC (permalink / raw)
To: Stephen Warren, Lee Jones, Eric Anholt, Greg Kroah-Hartman,
Florian Fainelli, Ray Jui, Scott Branden,
bcm-kernel-feedback-list
Cc: outreachy-kernel
Use dev_err(... in place of printk(KERN_ERR ...
Problem found by checkpatch
Signed-off-by: Aishwarya Pant <aishpant@gmail.com>
---
Changes in v3:
-Merge two if conditions
-Edit subject and commit message
Changes in v2:
-Prefer dev_err to pr_err where device information is available
drivers/staging/vc04_services/bcm2835-audio/bcm2835-ctl.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-ctl.c b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-ctl.c
index 46814fd..659c3d1 100644
--- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-ctl.c
+++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-ctl.c
@@ -139,10 +139,8 @@ static int snd_bcm2835_ctl_put(struct snd_kcontrol *kcontrol,
}
}
- if (changed) {
- if (bcm2835_audio_set_ctls(chip))
- printk(KERN_ERR "Failed to set ALSA controls..\n");
- }
+ if (changed && bcm2835_audio_set_ctls(chip))
+ dev_err(chip->card->dev, "Failed to set ALSA controls..\n");
unlock:
mutex_unlock(&chip->audio_mutex);
--
2.7.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [Outreachy kernel] [PATCH v3 0/5] staging: bcm2835-audio: fix multiple checkpatch warnings
2017-03-02 17:55 [PATCH v3 0/5] staging: bcm2835-audio: fix multiple checkpatch warnings Aishwarya Pant
` (4 preceding siblings ...)
2017-03-02 17:57 ` [PATCH v3 5/5] staging: bcm2835-camera: replace printk(KERN_ERR) with dev_err Aishwarya Pant
@ 2017-03-02 18:09 ` Alison Schofield
5 siblings, 0 replies; 7+ messages in thread
From: Alison Schofield @ 2017-03-02 18:09 UTC (permalink / raw)
To: Aishwarya Pant
Cc: Stephen Warren, Lee Jones, Eric Anholt, Greg Kroah-Hartman,
Florian Fainelli, Ray Jui, Scott Branden,
bcm-kernel-feedback-list, outreachy-kernel
On Thu, Mar 02, 2017 at 11:25:31PM +0530, Aishwarya Pant wrote:
> Fix multiple code styling warnings issued by checkpatch on file
> bcm2835-ctl.c in bcm2835-audio driver
>
> Changes in v3:
> -Merge two if conditions
> -Fix subject of patch replace printk(... by dev_err(...
> Changes in v2:
> -Replace pr_err with dev_err
>
Hi Aishwarya - See suggestions for the Subject Line commit messages below...
alisons
> Aishwarya Pant (5):
> *** HERE ***
> staging: bcm2835-camera: fix no space is necessary after a cast
> warning
remove space after cast
> staging: bcm2835-camera: Logical continuations should be on the
> previous line
move logical continuation to same line
> staging: bcm2835-camera: fix block comment formatting
use kernel preferred block commenting style
(so this one's more generic. Main point is it says use, instead of fix(
> staging: bcm2835-camera: remove extra blank line
looks good
> staging: bcm2835-camera: replace printk(KERN_ERR) with dev_err
looks good
>
> .../vc04_services/bcm2835-audio/bcm2835-ctl.c | 23 ++++++++++------------
> 1 file changed, 10 insertions(+), 13 deletions(-)
>
> --
> 2.7.4
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/cover.1488477174.git.aishpant%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2017-03-02 18:09 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-02 17:55 [PATCH v3 0/5] staging: bcm2835-audio: fix multiple checkpatch warnings Aishwarya Pant
2017-03-02 17:56 ` [PATCH v3 1/5] staging: bcm2835-camera: fix no space is necessary after a cast warning Aishwarya Pant
2017-03-02 17:56 ` [PATCH v3 2/5] staging: bcm2835-camera: Logical continuations should be on the previous line Aishwarya Pant
2017-03-02 17:56 ` [PATCH v3 3/5] staging: bcm2835-camera: fix block comment formatting Aishwarya Pant
2017-03-02 17:56 ` [PATCH v3 4/5] staging: bcm2835-camera: remove extra blank line Aishwarya Pant
2017-03-02 17:57 ` [PATCH v3 5/5] staging: bcm2835-camera: replace printk(KERN_ERR) with dev_err Aishwarya Pant
2017-03-02 18:09 ` [Outreachy kernel] [PATCH v3 0/5] staging: bcm2835-audio: fix multiple checkpatch warnings Alison Schofield
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.