summaryrefslogtreecommitdiffstats
path: root/drivers/net/caif
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2018-03-23 18:54:39 -0400
committerDavid S. Miller <davem@davemloft.net>2018-03-26 12:07:49 -0400
commitd61e40385655fbba659fc3d81df9bdf1b848e263 (patch)
tree434dfc436eae37889fa25c484c310ce05952269a /drivers/net/caif
parentd6444062f8f07c346a21bd815af4a3dc8b231574 (diff)
drivers/net: Use octal not symbolic permissions
Prefer the direct use of octal for permissions. Done with checkpatch -f --types=SYMBOLIC_PERMS --fix-inplace and some typing. Miscellanea: o Whitespace neatening around these conversions. Signed-off-by: Joe Perches <joe@perches.com> Reviewed-by: Wei Liu <wei.liu2@citrix.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/caif')
-rw-r--r--drivers/net/caif/caif_serial.c32
-rw-r--r--drivers/net/caif/caif_spi.c16
-rw-r--r--drivers/net/caif/caif_virtio.c16
3 files changed, 32 insertions, 32 deletions
diff --git a/drivers/net/caif/caif_serial.c b/drivers/net/caif/caif_serial.c
index 709838e4c062..a0f954f36c09 100644
--- a/drivers/net/caif/caif_serial.c
+++ b/drivers/net/caif/caif_serial.c
@@ -40,20 +40,20 @@ static LIST_HEAD(ser_list);
40static LIST_HEAD(ser_release_list); 40static LIST_HEAD(ser_release_list);
41 41
42static bool ser_loop; 42static bool ser_loop;
43module_param(ser_loop, bool, S_IRUGO); 43module_param(ser_loop, bool, 0444);
44MODULE_PARM_DESC(ser_loop, "Run in simulated loopback mode."); 44MODULE_PARM_DESC(ser_loop, "Run in simulated loopback mode.");
45 45
46static bool ser_use_stx = true; 46static bool ser_use_stx = true;
47module_param(ser_use_stx, bool, S_IRUGO); 47module_param(ser_use_stx, bool, 0444);
48MODULE_PARM_DESC(ser_use_stx, "STX enabled or not."); 48MODULE_PARM_DESC(ser_use_stx, "STX enabled or not.");
49 49
50static bool ser_use_fcs = true; 50static bool ser_use_fcs = true;
51 51
52module_param(ser_use_fcs, bool, S_IRUGO); 52module_param(ser_use_fcs, bool, 0444);
53MODULE_PARM_DESC(ser_use_fcs, "FCS enabled or not."); 53MODULE_PARM_DESC(ser_use_fcs, "FCS enabled or not.");
54 54
55static int ser_write_chunk = MAX_WRITE_CHUNK; 55static int ser_write_chunk = MAX_WRITE_CHUNK;
56module_param(ser_write_chunk, int, S_IRUGO); 56module_param(ser_write_chunk, int, 0444);
57 57
58MODULE_PARM_DESC(ser_write_chunk, "Maximum size of data written to UART."); 58MODULE_PARM_DESC(ser_write_chunk, "Maximum size of data written to UART.");
59 59
@@ -97,21 +97,21 @@ static inline void debugfs_init(struct ser_device *ser, struct tty_struct *tty)
97 ser->debugfs_tty_dir = 97 ser->debugfs_tty_dir =
98 debugfs_create_dir(tty->name, debugfsdir); 98 debugfs_create_dir(tty->name, debugfsdir);
99 if (!IS_ERR(ser->debugfs_tty_dir)) { 99 if (!IS_ERR(ser->debugfs_tty_dir)) {
100 debugfs_create_blob("last_tx_msg", S_IRUSR, 100 debugfs_create_blob("last_tx_msg", 0400,
101 ser->debugfs_tty_dir, 101 ser->debugfs_tty_dir,
102 &ser->tx_blob); 102 &ser->tx_blob);
103 103
104 debugfs_create_blob("last_rx_msg", S_IRUSR, 104 debugfs_create_blob("last_rx_msg", 0400,
105 ser->debugfs_tty_dir, 105 ser->debugfs_tty_dir,
106 &ser->rx_blob); 106 &ser->rx_blob);
107 107
108 debugfs_create_x32("ser_state", S_IRUSR, 108 debugfs_create_x32("ser_state", 0400,
109 ser->debugfs_tty_dir, 109 ser->debugfs_tty_dir,
110 (u32 *)&ser->state); 110 (u32 *)&ser->state);
111 111
112 debugfs_create_x8("tty_status", S_IRUSR, 112 debugfs_create_x8("tty_status", 0400,
113 ser->debugfs_tty_dir, 113 ser->debugfs_tty_dir,
114 &ser->tty_status); 114 &ser->tty_status);
115 115
116 } 116 }
117 ser->tx_blob.data = ser->tx_data; 117 ser->tx_blob.data = ser->tx_data;
diff --git a/drivers/net/caif/caif_spi.c b/drivers/net/caif/caif_spi.c
index 980eace53d44..d28a1398c091 100644
--- a/drivers/net/caif/caif_spi.c
+++ b/drivers/net/caif/caif_spi.c
@@ -35,27 +35,27 @@ MODULE_DESCRIPTION("CAIF SPI driver");
35#define PAD_POW2(x, pow) ((((x)&((pow)-1))==0) ? 0 : (((pow)-((x)&((pow)-1))))) 35#define PAD_POW2(x, pow) ((((x)&((pow)-1))==0) ? 0 : (((pow)-((x)&((pow)-1)))))
36 36
37static bool spi_loop; 37static bool spi_loop;
38module_param(spi_loop, bool, S_IRUGO); 38module_param(spi_loop, bool, 0444);
39MODULE_PARM_DESC(spi_loop, "SPI running in loopback mode."); 39MODULE_PARM_DESC(spi_loop, "SPI running in loopback mode.");
40 40
41/* SPI frame alignment. */ 41/* SPI frame alignment. */
42module_param(spi_frm_align, int, S_IRUGO); 42module_param(spi_frm_align, int, 0444);
43MODULE_PARM_DESC(spi_frm_align, "SPI frame alignment."); 43MODULE_PARM_DESC(spi_frm_align, "SPI frame alignment.");
44 44
45/* 45/*
46 * SPI padding options. 46 * SPI padding options.
47 * Warning: must be a base of 2 (& operation used) and can not be zero ! 47 * Warning: must be a base of 2 (& operation used) and can not be zero !
48 */ 48 */
49module_param(spi_up_head_align, int, S_IRUGO); 49module_param(spi_up_head_align, int, 0444);
50MODULE_PARM_DESC(spi_up_head_align, "SPI uplink head alignment."); 50MODULE_PARM_DESC(spi_up_head_align, "SPI uplink head alignment.");
51 51
52module_param(spi_up_tail_align, int, S_IRUGO); 52module_param(spi_up_tail_align, int, 0444);
53MODULE_PARM_DESC(spi_up_tail_align, "SPI uplink tail alignment."); 53MODULE_PARM_DESC(spi_up_tail_align, "SPI uplink tail alignment.");
54 54
55module_param(spi_down_head_align, int, S_IRUGO); 55module_param(spi_down_head_align, int, 0444);
56MODULE_PARM_DESC(spi_down_head_align, "SPI downlink head alignment."); 56MODULE_PARM_DESC(spi_down_head_align, "SPI downlink head alignment.");
57 57
58module_param(spi_down_tail_align, int, S_IRUGO); 58module_param(spi_down_tail_align, int, 0444);
59MODULE_PARM_DESC(spi_down_tail_align, "SPI downlink tail alignment."); 59MODULE_PARM_DESC(spi_down_tail_align, "SPI downlink tail alignment.");
60 60
61#ifdef CONFIG_ARM 61#ifdef CONFIG_ARM
@@ -250,10 +250,10 @@ static const struct file_operations dbgfs_frame_fops = {
250static inline void dev_debugfs_add(struct cfspi *cfspi) 250static inline void dev_debugfs_add(struct cfspi *cfspi)
251{ 251{
252 cfspi->dbgfs_dir = debugfs_create_dir(cfspi->pdev->name, dbgfs_root); 252 cfspi->dbgfs_dir = debugfs_create_dir(cfspi->pdev->name, dbgfs_root);
253 cfspi->dbgfs_state = debugfs_create_file("state", S_IRUGO, 253 cfspi->dbgfs_state = debugfs_create_file("state", 0444,
254 cfspi->dbgfs_dir, cfspi, 254 cfspi->dbgfs_dir, cfspi,
255 &dbgfs_state_fops); 255 &dbgfs_state_fops);
256 cfspi->dbgfs_frame = debugfs_create_file("frame", S_IRUGO, 256 cfspi->dbgfs_frame = debugfs_create_file("frame", 0444,
257 cfspi->dbgfs_dir, cfspi, 257 cfspi->dbgfs_dir, cfspi,
258 &dbgfs_frame_fops); 258 &dbgfs_frame_fops);
259} 259}
diff --git a/drivers/net/caif/caif_virtio.c b/drivers/net/caif/caif_virtio.c
index c3d104feee13..2814e0dee4bb 100644
--- a/drivers/net/caif/caif_virtio.c
+++ b/drivers/net/caif/caif_virtio.c
@@ -629,21 +629,21 @@ static inline void debugfs_init(struct cfv_info *cfv)
629 if (IS_ERR(cfv->debugfs)) 629 if (IS_ERR(cfv->debugfs))
630 return; 630 return;
631 631
632 debugfs_create_u32("rx-napi-complete", S_IRUSR, cfv->debugfs, 632 debugfs_create_u32("rx-napi-complete", 0400, cfv->debugfs,
633 &cfv->stats.rx_napi_complete); 633 &cfv->stats.rx_napi_complete);
634 debugfs_create_u32("rx-napi-resched", S_IRUSR, cfv->debugfs, 634 debugfs_create_u32("rx-napi-resched", 0400, cfv->debugfs,
635 &cfv->stats.rx_napi_resched); 635 &cfv->stats.rx_napi_resched);
636 debugfs_create_u32("rx-nomem", S_IRUSR, cfv->debugfs, 636 debugfs_create_u32("rx-nomem", 0400, cfv->debugfs,
637 &cfv->stats.rx_nomem); 637 &cfv->stats.rx_nomem);
638 debugfs_create_u32("rx-kicks", S_IRUSR, cfv->debugfs, 638 debugfs_create_u32("rx-kicks", 0400, cfv->debugfs,
639 &cfv->stats.rx_kicks); 639 &cfv->stats.rx_kicks);
640 debugfs_create_u32("tx-full-ring", S_IRUSR, cfv->debugfs, 640 debugfs_create_u32("tx-full-ring", 0400, cfv->debugfs,
641 &cfv->stats.tx_full_ring); 641 &cfv->stats.tx_full_ring);
642 debugfs_create_u32("tx-no-mem", S_IRUSR, cfv->debugfs, 642 debugfs_create_u32("tx-no-mem", 0400, cfv->debugfs,
643 &cfv->stats.tx_no_mem); 643 &cfv->stats.tx_no_mem);
644 debugfs_create_u32("tx-kicks", S_IRUSR, cfv->debugfs, 644 debugfs_create_u32("tx-kicks", 0400, cfv->debugfs,
645 &cfv->stats.tx_kicks); 645 &cfv->stats.tx_kicks);
646 debugfs_create_u32("tx-flow-on", S_IRUSR, cfv->debugfs, 646 debugfs_create_u32("tx-flow-on", 0400, cfv->debugfs,
647 &cfv->stats.tx_flow_on); 647 &cfv->stats.tx_flow_on);
648} 648}
649 649