Warning found by checkpatch.pl script. Adding blank line after declarations.
Signed-off-by: Edson Juliano Drosdeck <[email protected]>
---
drivers/cdrom/cdrom.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c
index cc2839805983..ae30390731bf 100644
--- a/drivers/cdrom/cdrom.c
+++ b/drivers/cdrom/cdrom.c
@@ -985,6 +985,7 @@ static void cdrom_count_tracks(struct cdrom_device_info *cdi, tracktype *tracks)
struct cdrom_tochdr header;
struct cdrom_tocentry entry;
int ret, i;
+
tracks->data = 0;
tracks->audio = 0;
tracks->cdi = 0;
@@ -1038,6 +1039,7 @@ int open_for_data(struct cdrom_device_info *cdi)
int ret;
const struct cdrom_device_ops *cdo = cdi->ops;
tracktype tracks;
+
cd_dbg(CD_OPEN, "entering open_for_data\n");
/* Check if the driver can report drive status. If it can, we
can do clever things. If it can't, well, we at least tried! */
@@ -1202,6 +1204,7 @@ static int check_for_audio_disc(struct cdrom_device_info *cdi,
{
int ret;
tracktype tracks;
+
cd_dbg(CD_OPEN, "entering check_for_audio_disc\n");
if (!(cdi->options & CDO_CHECK_TYPE))
return 0;
@@ -3038,6 +3041,7 @@ static noinline int mmc_ioctl_cdrom_subchannel(struct cdrom_device_info *cdi,
int ret;
struct cdrom_subchnl q;
u_char requested, back;
+
if (copy_from_user(&q, (struct cdrom_subchnl __user *)arg, sizeof(q)))
return -EFAULT;
requested = q.cdsc_format;
@@ -3063,6 +3067,7 @@ static noinline int mmc_ioctl_cdrom_play_msf(struct cdrom_device_info *cdi,
{
const struct cdrom_device_ops *cdo = cdi->ops;
struct cdrom_msf msf;
+
cd_dbg(CD_DO_IOCTL, "entering CDROMPLAYMSF\n");
if (copy_from_user(&msf, (struct cdrom_msf __user *)arg, sizeof(msf)))
return -EFAULT;
@@ -3083,6 +3088,7 @@ static noinline int mmc_ioctl_cdrom_play_blk(struct cdrom_device_info *cdi,
{
const struct cdrom_device_ops *cdo = cdi->ops;
struct cdrom_blk blk;
+
cd_dbg(CD_DO_IOCTL, "entering CDROMPLAYBLK\n");
if (copy_from_user(&blk, (struct cdrom_blk __user *)arg, sizeof(blk)))
return -EFAULT;
@@ -3177,6 +3183,7 @@ static noinline int mmc_ioctl_cdrom_start_stop(struct cdrom_device_info *cdi,
int cmd)
{
const struct cdrom_device_ops *cdo = cdi->ops;
+
cd_dbg(CD_DO_IOCTL, "entering CDROMSTART/CDROMSTOP\n");
cgc->cmd[0] = GPCMD_START_STOP_UNIT;
cgc->cmd[1] = 1;
@@ -3190,6 +3197,7 @@ static noinline int mmc_ioctl_cdrom_pause_resume(struct cdrom_device_info *cdi,
int cmd)
{
const struct cdrom_device_ops *cdo = cdi->ops;
+
cd_dbg(CD_DO_IOCTL, "entering CDROMPAUSE/CDROMRESUME\n");
cgc->cmd[0] = GPCMD_PAUSE_RESUME;
cgc->cmd[8] = (cmd == CDROMRESUME) ? 1 : 0;
@@ -3230,6 +3238,7 @@ static noinline int mmc_ioctl_dvd_auth(struct cdrom_device_info *cdi,
{
int ret;
dvd_authinfo ai;
+
if (!CDROM_CAN(CDC_DVD))
return -ENOSYS;
cd_dbg(CD_DO_IOCTL, "entering DVD_AUTH\n");
@@ -3248,6 +3257,7 @@ static noinline int mmc_ioctl_cdrom_next_writable(struct cdrom_device_info *cdi,
{
int ret;
long next = 0;
+
cd_dbg(CD_DO_IOCTL, "entering CDROM_NEXT_WRITABLE\n");
ret = cdrom_get_next_writable(cdi, &next);
if (ret)
@@ -3262,6 +3272,7 @@ static noinline int mmc_ioctl_cdrom_last_written(struct cdrom_device_info *cdi,
{
int ret;
long last = 0;
+
cd_dbg(CD_DO_IOCTL, "entering CDROM_LAST_WRITTEN\n");
ret = cdrom_get_last_written(cdi, &last);
if (ret)
--
2.39.2
On Sun, Oct 15, 2023 at 02:28:46PM -0300, Edson Juliano Drosdeck wrote:
> Warning found by checkpatch.pl script. Adding blank line after declarations.
>
> Signed-off-by: Edson Juliano Drosdeck <[email protected]>
> ---
> drivers/cdrom/cdrom.c | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c
> index cc2839805983..ae30390731bf 100644
> --- a/drivers/cdrom/cdrom.c
> +++ b/drivers/cdrom/cdrom.c
> @@ -985,6 +985,7 @@ static void cdrom_count_tracks(struct cdrom_device_info *cdi, tracktype *tracks)
> struct cdrom_tochdr header;
> struct cdrom_tocentry entry;
> int ret, i;
> +
> tracks->data = 0;
> tracks->audio = 0;
> tracks->cdi = 0;
> @@ -1038,6 +1039,7 @@ int open_for_data(struct cdrom_device_info *cdi)
> int ret;
> const struct cdrom_device_ops *cdo = cdi->ops;
> tracktype tracks;
> +
> cd_dbg(CD_OPEN, "entering open_for_data\n");
> /* Check if the driver can report drive status. If it can, we
> can do clever things. If it can't, well, we at least tried! */
> @@ -1202,6 +1204,7 @@ static int check_for_audio_disc(struct cdrom_device_info *cdi,
> {
> int ret;
> tracktype tracks;
> +
> cd_dbg(CD_OPEN, "entering check_for_audio_disc\n");
> if (!(cdi->options & CDO_CHECK_TYPE))
> return 0;
> @@ -3038,6 +3041,7 @@ static noinline int mmc_ioctl_cdrom_subchannel(struct cdrom_device_info *cdi,
> int ret;
> struct cdrom_subchnl q;
> u_char requested, back;
> +
> if (copy_from_user(&q, (struct cdrom_subchnl __user *)arg, sizeof(q)))
> return -EFAULT;
> requested = q.cdsc_format;
> @@ -3063,6 +3067,7 @@ static noinline int mmc_ioctl_cdrom_play_msf(struct cdrom_device_info *cdi,
> {
> const struct cdrom_device_ops *cdo = cdi->ops;
> struct cdrom_msf msf;
> +
> cd_dbg(CD_DO_IOCTL, "entering CDROMPLAYMSF\n");
> if (copy_from_user(&msf, (struct cdrom_msf __user *)arg, sizeof(msf)))
> return -EFAULT;
> @@ -3083,6 +3088,7 @@ static noinline int mmc_ioctl_cdrom_play_blk(struct cdrom_device_info *cdi,
> {
> const struct cdrom_device_ops *cdo = cdi->ops;
> struct cdrom_blk blk;
> +
> cd_dbg(CD_DO_IOCTL, "entering CDROMPLAYBLK\n");
> if (copy_from_user(&blk, (struct cdrom_blk __user *)arg, sizeof(blk)))
> return -EFAULT;
> @@ -3177,6 +3183,7 @@ static noinline int mmc_ioctl_cdrom_start_stop(struct cdrom_device_info *cdi,
> int cmd)
> {
> const struct cdrom_device_ops *cdo = cdi->ops;
> +
> cd_dbg(CD_DO_IOCTL, "entering CDROMSTART/CDROMSTOP\n");
> cgc->cmd[0] = GPCMD_START_STOP_UNIT;
> cgc->cmd[1] = 1;
> @@ -3190,6 +3197,7 @@ static noinline int mmc_ioctl_cdrom_pause_resume(struct cdrom_device_info *cdi,
> int cmd)
> {
> const struct cdrom_device_ops *cdo = cdi->ops;
> +
> cd_dbg(CD_DO_IOCTL, "entering CDROMPAUSE/CDROMRESUME\n");
> cgc->cmd[0] = GPCMD_PAUSE_RESUME;
> cgc->cmd[8] = (cmd == CDROMRESUME) ? 1 : 0;
> @@ -3230,6 +3238,7 @@ static noinline int mmc_ioctl_dvd_auth(struct cdrom_device_info *cdi,
> {
> int ret;
> dvd_authinfo ai;
> +
> if (!CDROM_CAN(CDC_DVD))
> return -ENOSYS;
> cd_dbg(CD_DO_IOCTL, "entering DVD_AUTH\n");
> @@ -3248,6 +3257,7 @@ static noinline int mmc_ioctl_cdrom_next_writable(struct cdrom_device_info *cdi,
> {
> int ret;
> long next = 0;
> +
> cd_dbg(CD_DO_IOCTL, "entering CDROM_NEXT_WRITABLE\n");
> ret = cdrom_get_next_writable(cdi, &next);
> if (ret)
> @@ -3262,6 +3272,7 @@ static noinline int mmc_ioctl_cdrom_last_written(struct cdrom_device_info *cdi,
> {
> int ret;
> long last = 0;
> +
> cd_dbg(CD_DO_IOCTL, "entering CDROM_LAST_WRITTEN\n");
> ret = cdrom_get_last_written(cdi, &last);
> if (ret)
> --
> 2.39.2
>
Hi Edson,
Thanks for the patch, looks good to me, will send on for inclusion. That
said, I will also tweak the title/commit description to a more imperative
style, given that this description itself currently triggers
checkpatch.pl due to line length.
Reviewed-by: Phillip Potter <[email protected]>
Regards,
Phil
On Mon, Oct 16, 2023 at 09:33:44PM +0100, Phillip Potter wrote:
>
> Hi Edson,
>
> Thanks for the patch, looks good to me, will send on for inclusion. That
> said, I will also tweak the title/commit description to a more imperative
> style, given that this description itself currently triggers
> checkpatch.pl due to line length.
>
> Reviewed-by: Phillip Potter <[email protected]>
>
> Regards,
> Phil
Hi Edson,
After conversing with the Block maintainer (Jens Axboe) it has been
decided that this will not infact be merged, as all it does is introduce
newlines and patches of this type generally just cause problem for
auto-application of patches to stable kernel branches. Thank you anyway
though, and by all means feel free to send other CD-ROM patches my way
in future.
Regards,
Phil