This series contains minor code style cleanups to fix checkpatch warnings.
This handles TODO item "Fix the remaining checkpatch.pl errors and
warnings"
Adrien Thierry (2):
staging: bcm2835-audio: fully describe config symbol
staging: bcm2835-audio: clean code style warnings
drivers/staging/vc04_services/bcm2835-audio/Kconfig | 5 ++++-
drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c | 5 ++---
drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c | 2 +-
drivers/staging/vc04_services/bcm2835-audio/bcm2835.h | 2 +-
4 files changed, 8 insertions(+), 6 deletions(-)
base-commit: 194193dd06848c1839d928090cb2032eec8b2f9c
--
2.35.1
Clean a few minor code style warnings.
Reported by checkpatch:
CHECK: Lines should not end with a '('
FILE: drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c:85:
CHECK: No space is necessary after a cast
FILE: drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c:240:
CHECK: struct mutex definition without comment
FILE: drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c:14:
CHECK: struct mutex definition without comment
FILE: drivers/staging/vc04_services/bcm2835-audio/bcm2835.h:64:
Signed-off-by: Adrien Thierry <[email protected]>
---
drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c | 5 ++---
drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c | 2 +-
drivers/staging/vc04_services/bcm2835-audio/bcm2835.h | 2 +-
3 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c
index f2ef1d641e70..68e8d491a7ec 100644
--- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c
+++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c
@@ -82,8 +82,7 @@ void bcm2835_playback_fifo(struct bcm2835_alsa_stream *alsa_stream,
}
/* open callback */
-static int snd_bcm2835_playback_open_generic(
- struct snd_pcm_substream *substream, int spdif)
+static int snd_bcm2835_playback_open_generic(struct snd_pcm_substream *substream, int spdif)
{
struct bcm2835_chip *chip = snd_pcm_substream_chip(substream);
struct snd_pcm_runtime *runtime = substream->runtime;
@@ -237,7 +236,7 @@ static void snd_bcm2835_pcm_transfer(struct snd_pcm_substream *substream,
{
struct snd_pcm_runtime *runtime = substream->runtime;
struct bcm2835_alsa_stream *alsa_stream = runtime->private_data;
- void *src = (void *) (substream->runtime->dma_area + rec->sw_data);
+ void *src = (void *)(substream->runtime->dma_area + rec->sw_data);
bcm2835_audio_write(alsa_stream, bytes, src);
}
diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c
index d567a2e3f70c..e429b33b4d39 100644
--- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c
+++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c
@@ -11,7 +11,7 @@ struct bcm2835_audio_instance {
struct device *dev;
unsigned int service_handle;
struct completion msg_avail_comp;
- struct mutex vchi_mutex;
+ struct mutex vchi_mutex; /* Serialize vchiq access */
struct bcm2835_alsa_stream *alsa_stream;
int result;
unsigned int max_packet;
diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835.h b/drivers/staging/vc04_services/bcm2835-audio/bcm2835.h
index 51066ac8eea5..38b7451d77b2 100644
--- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835.h
+++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835.h
@@ -61,7 +61,7 @@ struct bcm2835_chip {
unsigned int opened;
unsigned int spdif_status;
- struct mutex audio_mutex;
+ struct mutex audio_mutex; /* Serialize chip data access */
struct bcm2835_vchi_ctx *vchi_ctx;
};
--
2.35.1
On Thu, Apr 14, 2022 at 11:23:40AM -0400, Adrien Thierry wrote:
> Clean a few minor code style warnings.
>
> Reported by checkpatch:
>
> CHECK: Lines should not end with a '('
> FILE: drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c:85:
>
> CHECK: No space is necessary after a cast
> FILE: drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c:240:
>
> CHECK: struct mutex definition without comment
> FILE: drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c:14:
>
> CHECK: struct mutex definition without comment
> FILE: drivers/staging/vc04_services/bcm2835-audio/bcm2835.h:64:
>
> Signed-off-by: Adrien Thierry <[email protected]>
> ---
> drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c | 5 ++---
> drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c | 2 +-
> drivers/staging/vc04_services/bcm2835-audio/bcm2835.h | 2 +-
> 3 files changed, 4 insertions(+), 5 deletions(-)
>
Hi,
This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him
a patch that has triggered this response. He used to manually respond
to these common problems, but in order to save his sanity (he kept
writing the same thing over and over, yet to different people), I was
created. Hopefully you will not take offence and will fix the problem
in your patch and resubmit it so that it can be accepted into the Linux
kernel tree.
You are receiving this message because of the following common error(s)
as indicated below:
- Your patch did many different things all at once, making it difficult
to review. All Linux kernel patches need to only do one thing at a
time. If you need to do multiple things (such as clean up all coding
style issues in a file/driver), do it in a sequence of patches, each
one doing only one thing. This will make it easier to review the
patches to ensure that they are correct, and to help alleviate any
merge issues that larger patches can cause.
If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.
thanks,
greg k-h's patch email bot
Explain SND_BCM2835 config option in more detail, especially the
implications of using the bcm2835-audio driver in conjunction with vc4
for HDMI audio.
Reported by checkpatch:
WARNING: please write a help paragraph that fully describes the config
symbol
FILE: drivers/staging/vc04_services/bcm2835-audio/Kconfig:2
Signed-off-by: Adrien Thierry <[email protected]>
---
drivers/staging/vc04_services/bcm2835-audio/Kconfig | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/vc04_services/bcm2835-audio/Kconfig b/drivers/staging/vc04_services/bcm2835-audio/Kconfig
index d32ea348e846..7cd0b3c0cae4 100644
--- a/drivers/staging/vc04_services/bcm2835-audio/Kconfig
+++ b/drivers/staging/vc04_services/bcm2835-audio/Kconfig
@@ -5,5 +5,8 @@ config SND_BCM2835
select SND_PCM
select BCM2835_VCHIQ
help
- Say Y or M if you want to support BCM2835 built in audio
+ Say Y or M if you want to support BCM2835 built in audio.
+ This driver handles both 3.5mm and HDMI audio. However, please
+ note that when HDMI audio is enabled with this driver, the vc4
+ driver cannot be used simultaneously, otherwise HDMI will break.
--
2.35.1
On Thu, Apr 14, 2022 at 11:23:39AM -0400, Adrien Thierry wrote:
> Explain SND_BCM2835 config option in more detail, especially the
> implications of using the bcm2835-audio driver in conjunction with vc4
> for HDMI audio.
>
> Reported by checkpatch:
>
> WARNING: please write a help paragraph that fully describes the config
> symbol
> FILE: drivers/staging/vc04_services/bcm2835-audio/Kconfig:2
>
> Signed-off-by: Adrien Thierry <[email protected]>
> ---
> drivers/staging/vc04_services/bcm2835-audio/Kconfig | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/staging/vc04_services/bcm2835-audio/Kconfig b/drivers/staging/vc04_services/bcm2835-audio/Kconfig
> index d32ea348e846..7cd0b3c0cae4 100644
> --- a/drivers/staging/vc04_services/bcm2835-audio/Kconfig
> +++ b/drivers/staging/vc04_services/bcm2835-audio/Kconfig
> @@ -5,5 +5,8 @@ config SND_BCM2835
> select SND_PCM
> select BCM2835_VCHIQ
> help
> - Say Y or M if you want to support BCM2835 built in audio
> + Say Y or M if you want to support BCM2835 built in audio.
> + This driver handles both 3.5mm and HDMI audio. However, please
> + note that when HDMI audio is enabled with this driver, the vc4
> + driver cannot be used simultaneously, otherwise HDMI will break.
"will break"? What exactly do you mean by this? What will fail? How
will it fail? Why does this matter in a Kconfig help text?
thanks,
greg k-h