2018-03-04 10:17:32

by Valentin Vidic

[permalink] [raw]
Subject: [PATCH] staging: pi433: fix CamelCase for packetFormat enum

Fixes checkpatch warnings:

CHECK: Avoid CamelCase: <packetFormat>
CHECK: Avoid CamelCase: <packetLengthFix>
CHECK: Avoid CamelCase: <packetLengthVar>

Signed-off-by: Valentin Vidic <[email protected]>
---
drivers/staging/pi433/pi433_if.c | 8 ++++----
drivers/staging/pi433/rf69.c | 8 ++++----
drivers/staging/pi433/rf69.h | 2 +-
drivers/staging/pi433/rf69_enum.h | 6 +++---
4 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/pi433/pi433_if.c b/drivers/staging/pi433/pi433_if.c
index aad1debd34a2..b1cbec876857 100644
--- a/drivers/staging/pi433/pi433_if.c
+++ b/drivers/staging/pi433/pi433_if.c
@@ -222,11 +222,11 @@ rf69_set_rx_cfg(struct pi433_device *dev, struct pi433_rx_cfg *rx_cfg)
return ret;
}
if (rx_cfg->enable_length_byte == OPTION_ON) {
- ret = rf69_set_packet_format(dev->spi, packetLengthVar);
+ ret = rf69_set_packet_format(dev->spi, packet_length_var);
if (ret < 0)
return ret;
} else {
- ret = rf69_set_packet_format(dev->spi, packetLengthFix);
+ ret = rf69_set_packet_format(dev->spi, packet_length_fix);
if (ret < 0)
return ret;
}
@@ -337,11 +337,11 @@ rf69_set_tx_cfg(struct pi433_device *dev, struct pi433_tx_cfg *tx_cfg)
}

if (tx_cfg->enable_length_byte == OPTION_ON) {
- ret = rf69_set_packet_format(dev->spi, packetLengthVar);
+ ret = rf69_set_packet_format(dev->spi, packet_length_var);
if (ret < 0)
return ret;
} else {
- ret = rf69_set_packet_format(dev->spi, packetLengthFix);
+ ret = rf69_set_packet_format(dev->spi, packet_length_fix);
if (ret < 0)
return ret;
}
diff --git a/drivers/staging/pi433/rf69.c b/drivers/staging/pi433/rf69.c
index b2cea5f52eea..54d8105b5812 100644
--- a/drivers/staging/pi433/rf69.c
+++ b/drivers/staging/pi433/rf69.c
@@ -661,12 +661,12 @@ int rf69_set_sync_values(struct spi_device *spi, u8 sync_values[8])
return retval;
}

-int rf69_set_packet_format(struct spi_device *spi, enum packetFormat packetFormat)
+int rf69_set_packet_format(struct spi_device *spi, enum packet_format packet_format)
{
- switch (packetFormat) {
- case packetLengthVar:
+ switch (packet_format) {
+ case packet_length_var:
return rf69_set_bit(spi, REG_PACKETCONFIG1, MASK_PACKETCONFIG1_PAKET_FORMAT_VARIABLE);
- case packetLengthFix:
+ case packet_length_fix:
return rf69_clear_bit(spi, REG_PACKETCONFIG1, MASK_PACKETCONFIG1_PAKET_FORMAT_VARIABLE);
default:
dev_dbg(&spi->dev, "set: illegal input param");
diff --git a/drivers/staging/pi433/rf69.h b/drivers/staging/pi433/rf69.h
index cf89b556cb00..7b7932a553e8 100644
--- a/drivers/staging/pi433/rf69.h
+++ b/drivers/staging/pi433/rf69.h
@@ -50,7 +50,7 @@ int rf69_disable_sync(struct spi_device *spi);
int rf69_set_fifo_fill_condition(struct spi_device *spi, enum fifo_fill_condition fifo_fill_condition);
int rf69_set_sync_size(struct spi_device *spi, u8 sync_size);
int rf69_set_sync_values(struct spi_device *spi, u8 sync_values[8]);
-int rf69_set_packet_format(struct spi_device *spi, enum packetFormat packetFormat);
+int rf69_set_packet_format(struct spi_device *spi, enum packet_format packet_format);
int rf69_enable_crc(struct spi_device *spi);
int rf69_disable_crc(struct spi_device *spi);
int rf69_set_address_filtering(struct spi_device *spi, enum address_filtering address_filtering);
diff --git a/drivers/staging/pi433/rf69_enum.h b/drivers/staging/pi433/rf69_enum.h
index cba3c5b3995c..682b667bf342 100644
--- a/drivers/staging/pi433/rf69_enum.h
+++ b/drivers/staging/pi433/rf69_enum.h
@@ -118,9 +118,9 @@ enum fifo_fill_condition {
always
};

-enum packetFormat {
- packetLengthFix,
- packetLengthVar
+enum packet_format {
+ packet_length_fix,
+ packet_length_var
};

enum tx_start_condition {
--
2.16.1



2018-03-04 14:11:30

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH] staging: pi433: fix CamelCase for packetFormat enum

On Sun, Mar 04, 2018 at 10:55:56AM +0100, Valentin Vidic wrote:
> Fixes checkpatch warnings:
>
> CHECK: Avoid CamelCase: <packetFormat>
> CHECK: Avoid CamelCase: <packetLengthFix>
> CHECK: Avoid CamelCase: <packetLengthVar>
>
> Signed-off-by: Valentin Vidic <[email protected]>
> ---

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:

- You sent multiple patches, yet no indication of which ones should be
applied in which order. Greg could just guess, but if you are
receiving this email, he guessed wrong and the patches didn't apply.
Please read the section entitled "The canonical patch format" in the
kernel file, Documentation/SubmittingPatches for a description of how
to do this so that Greg has a chance to apply these correctly.

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