From: Rishabh Hardas <rishabhhardas@gmail.com>
To: gregkh@linuxfoundation.org
Cc: linux@Wolf-Entwicklungen.de, devel@driverdev.osuosl.org,
linux-kernel@vger.kernel.org,
Rishabh Hardas <rishabhhardas@gmail.com>
Subject: [PATCH 1/5] staging/pi433:Removed Coding style issues from pi433_if.h and other dependencies arising from it.
Date: Wed, 2 Aug 2017 01:01:55 +0530 [thread overview]
Message-ID: <1501615919-31875-1-git-send-email-rishabhhardas@gmail.com> (raw)
This is a 5 patch series which solves coding style issues
as marked by checkpatch.pl in the file pi433_if.h and
contains changes that have to be made in other files as a
consequence of the changes made in pi433_if.h
Signed-off-by: Rishabh Hardas <rishabhhardas@gmail.com>
---
drivers/staging/pi433/pi433_if.h | 81 +++++++++++++++++++++-------------------
1 file changed, 43 insertions(+), 38 deletions(-)
diff --git a/drivers/staging/pi433/pi433_if.h b/drivers/staging/pi433/pi433_if.h
index e6ed3cd..d87434c 100644
--- a/drivers/staging/pi433/pi433_if.h
+++ b/drivers/staging/pi433/pi433_if.h
@@ -32,15 +32,11 @@
#include <linux/types.h>
#include "rf69_enum.h"
-/*---------------------------------------------------------------------------*/
-
-
-/*---------------------------------------------------------------------------*/
-
/* IOCTL structs and commands */
/**
- * struct pi433_tx_config - describes the configuration of the radio module for sending
+ * struct pi433_tx_config - describes the configuration of
+ * the radio module for sending
* @frequency:
* @bit_rate:
* @modulation:
@@ -57,28 +53,26 @@
*
* NOTE: struct layout is the same in 64bit and 32bit userspace.
*/
-#define PI433_TX_CFG_IOCTL_NR 0
-struct pi433_tx_cfg
-{
+#define PI433_TX_CFG_IOCTL_NR 0
+struct pi433_tx_cfg {
__u32 frequency;
__u16 bit_rate;
__u32 dev_frequency;
enum modulation modulation;
- enum modShaping modShaping;
+ enum mod_shaping mod_shaping;
- enum paRamp pa_ramp;
+ enum pa_ramp pa_ramp;
- enum txStartCondition tx_start_condition;
+ enum tx_start_condition tx_start_condition;
__u16 repetitions;
-
/* packet format */
- enum optionOnOff enable_preamble;
- enum optionOnOff enable_sync;
- enum optionOnOff enable_length_byte;
- enum optionOnOff enable_address_byte;
- enum optionOnOff enable_crc;
+ enum option_on_off enable_preamble;
+ enum option_on_off enable_sync;
+ enum option_on_off enable_length_byte;
+ enum option_on_off enable_address_byte;
+ enum option_on_off enable_crc;
__u16 preamble_length;
__u8 sync_length;
@@ -88,9 +82,9 @@ struct pi433_tx_cfg
__u8 address_byte;
};
-
/**
- * struct pi433_rx_config - describes the configuration of the radio module for sending
+ * struct pi433_rx_config - describes the configuration of
+ * the radio module for sending
* @frequency:
* @bit_rate:
* @modulation:
@@ -107,29 +101,37 @@ struct pi433_tx_cfg
*
* NOTE: struct layout is the same in 64bit and 32bit userspace.
*/
-#define PI433_RX_CFG_IOCTL_NR 1
+#define PI433_RX_CFG_IOCTL_NR 1
struct pi433_rx_cfg {
__u32 frequency;
__u16 bit_rate;
__u32 dev_frequency;
- enum modulation modulation;
+ enum modulation modulation;
- __u8 rssi_threshold;
- enum thresholdDecrement thresholdDecrement;
- enum antennaImpedance antenna_impedance;
- enum lnaGain lna_gain;
- enum mantisse bw_mantisse; /* normal: 0x50 */
- __u8 bw_exponent; /* during AFC: 0x8b */
- enum dagc dagc;
+ __u8 rssi_threshold;
+ enum threshold_decrement threshold_decrement;
+ enum antenna_impedance antenna_impedance;
+ enum lnagain lna_gain;
+ enum mantisse bw_mantisse; /* normal: 0x50 */
+ __u8 bw_exponent; /* during AFC: 0x8b */
+ enum dagc dagc;
/* packet format */
- enum optionOnOff enable_sync;
- enum optionOnOff enable_length_byte; /* should be used in combination with sync, only */
- enum addressFiltering enable_address_filtering; /* operational with sync, only */
- enum optionOnOff enable_crc; /* only operational, if sync on and fixed length or length byte is used */
+ enum option_on_off enable_sync;
+ enum option_on_off enable_length_byte;/* should be used
+ * in combination
+ * with sync,only
+ */
+ enum address_filtering enable_address_filtering;/* operational with
+ * sync, only
+ */
+ enum option_on_off enable_crc;/* only operational, if sync on
+ *and fixed length or
+ *length byte is used
+ */
__u8 sync_length;
__u8 fixed_message_length;
@@ -140,13 +142,16 @@ struct pi433_rx_cfg {
__u8 broadcast_address;
};
-
#define PI433_IOC_MAGIC 'r'
-#define PI433_IOC_RD_TX_CFG _IOR(PI433_IOC_MAGIC, PI433_TX_CFG_IOCTL_NR, char[sizeof(struct pi433_tx_cfg)])
-#define PI433_IOC_WR_TX_CFG _IOW(PI433_IOC_MAGIC, PI433_TX_CFG_IOCTL_NR, char[sizeof(struct pi433_tx_cfg)])
+#define PI433_IOC_RD_TX_CFG _IOR(PI433_IOC_MAGIC, PI433_TX_CFG_IOCTL_NR,\
+ char[sizeof(struct pi433_tx_cfg)])
+#define PI433_IOC_WR_TX_CFG _IOW(PI433_IOC_MAGIC, PI433_TX_CFG_IOCTL_NR,\
+ char[sizeof(struct pi433_tx_cfg)])
-#define PI433_IOC_RD_RX_CFG _IOR(PI433_IOC_MAGIC, PI433_RX_CFG_IOCTL_NR, char[sizeof(struct pi433_rx_cfg)])
-#define PI433_IOC_WR_RX_CFG _IOW(PI433_IOC_MAGIC, PI433_RX_CFG_IOCTL_NR, char[sizeof(struct pi433_rx_cfg)])
+#define PI433_IOC_RD_RX_CFG _IOR(PI433_IOC_MAGIC, PI433_RX_CFG_IOCTL_NR,\
+ char[sizeof(struct pi433_rx_cfg)])
+#define PI433_IOC_WR_RX_CFG _IOW(PI433_IOC_MAGIC, PI433_RX_CFG_IOCTL_NR,\
+ char[sizeof(struct pi433_rx_cfg)])
#endif /* PI433_H */
--
2.7.4
next reply other threads:[~2017-08-01 19:32 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-01 19:31 Rishabh Hardas [this message]
2017-08-01 19:31 ` [PATCH 2/5] staging/pi433/pi433_if.c:Removed " Rishabh Hardas
2017-08-02 8:09 ` Wolf Entwicklungen
2017-08-02 8:26 ` Dan Carpenter
2017-08-01 19:31 ` [PATCH 3/5] staging/pi433/rf69.h:Removed " Rishabh Hardas
2017-08-02 8:10 ` Wolf Entwicklungen
2017-08-01 19:31 ` [PATCH 4/5] staging/pi433/rf69.c:Removed " Rishabh Hardas
2017-08-02 8:13 ` Wolf Entwicklungen
2017-08-01 19:31 ` [PATCH 5/5] staging/pi433/rf69_enum.h:Removed " Rishabh Hardas
2017-08-02 8:14 ` Wolf Entwicklungen
2017-08-02 8:08 ` [PATCH 1/5] staging/pi433:Removed " Wolf Entwicklungen
2017-08-02 8:34 ` Dan Carpenter
2017-08-02 8:52 ` Marcus Wolf
2017-08-02 8:59 ` Dan Carpenter
2017-08-02 9:15 ` Wolf Entwicklungen
2017-08-02 9:33 ` Dan Carpenter
[not found] ` <CAOo1wfVa6HoRLK9nXmnGotQ9n_hVmB01Osm1XjgJf3J_vqrY_g@mail.gmail.com>
2017-08-02 10:51 ` Dan Carpenter
2017-08-02 8:19 ` Dan Carpenter
2017-08-02 8:23 ` Dan Carpenter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1501615919-31875-1-git-send-email-rishabhhardas@gmail.com \
--to=rishabhhardas@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@Wolf-Entwicklungen.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome