* [PATCH 01/15] w1: ds2408: drop kerneldoc annotation
@ 2023-04-15 10:42 Krzysztof Kozlowski
2023-04-15 10:42 ` [PATCH 02/15] w1: ds2433: correct " Krzysztof Kozlowski
` (15 more replies)
0 siblings, 16 replies; 23+ messages in thread
From: Krzysztof Kozlowski @ 2023-04-15 10:42 UTC (permalink / raw)
To: Krzysztof Kozlowski, linux-kernel
Cc: Evgeniy Polyakov, Greg Kroah-Hartman, Arnd Bergmann,
Olof Johansson, soc, linux-arm-kernel
Drop kerneldoc annotation from comment which is not a kerneldoc to fix:
w1_ds2408.c:210: warning: This comment starts with '/**', but isn't a kernel-doc comment
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
drivers/w1/slaves/w1_ds2408.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/w1/slaves/w1_ds2408.c b/drivers/w1/slaves/w1_ds2408.c
index ad102c577122..7fa911989193 100644
--- a/drivers/w1/slaves/w1_ds2408.c
+++ b/drivers/w1/slaves/w1_ds2408.c
@@ -206,7 +206,7 @@ static ssize_t output_write(struct file *filp, struct kobject *kobj,
}
-/**
+/*
* Writing to the activity file resets the activity latches.
*/
static ssize_t activity_write(struct file *filp, struct kobject *kobj,
--
2.34.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 02/15] w1: ds2433: correct kerneldoc annotation
2023-04-15 10:42 [PATCH 01/15] w1: ds2408: drop kerneldoc annotation Krzysztof Kozlowski
@ 2023-04-15 10:42 ` Krzysztof Kozlowski
2023-04-15 16:08 ` Randy Dunlap
2023-04-15 10:42 ` [PATCH 03/15] w1: ds28e04: " Krzysztof Kozlowski
` (14 subsequent siblings)
15 siblings, 1 reply; 23+ messages in thread
From: Krzysztof Kozlowski @ 2023-04-15 10:42 UTC (permalink / raw)
To: Krzysztof Kozlowski, linux-kernel
Cc: Evgeniy Polyakov, Greg Kroah-Hartman, Arnd Bergmann,
Olof Johansson, soc, linux-arm-kernel
Correct kerneldoc comments (or drop annotation) to fix:
w1_ds2433.c:46: warning: This comment starts with '/**', but isn't a kernel-doc comment.
w1_ds2433.c:141: warning: This comment starts with '/**', but isn't a kernel-doc comment.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
drivers/w1/slaves/w1_ds2433.c | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/drivers/w1/slaves/w1_ds2433.c b/drivers/w1/slaves/w1_ds2433.c
index 0f72df15a024..6134ca2f37fe 100644
--- a/drivers/w1/slaves/w1_ds2433.c
+++ b/drivers/w1/slaves/w1_ds2433.c
@@ -42,7 +42,7 @@ struct w1_f23_data {
u32 validcrc;
};
-/**
+/*
* Check the file size bounds and adjusts count as needed.
* This would not be needed if the file size didn't reset to 0 after a write.
*/
@@ -138,16 +138,17 @@ static ssize_t eeprom_read(struct file *filp, struct kobject *kobj,
}
/**
- * Writes to the scratchpad and reads it back for verification.
+ * w1_f23_write() - Writes to the scratchpad and reads it back for verification.
+ * @sl: The slave structure
+ * @addr: Address for the write
+ * @len: length must be <= (W1_PAGE_SIZE - (addr & W1_PAGE_MASK))
+ * @data: The data to write
+ *
* Then copies the scratchpad to EEPROM.
* The data must be on one page.
* The master must be locked.
*
- * @param sl The slave structure
- * @param addr Address for the write
- * @param len length must be <= (W1_PAGE_SIZE - (addr & W1_PAGE_MASK))
- * @param data The data to write
- * @return 0=Success -1=failure
+ * Return: 0=Success, -1=failure
*/
static int w1_f23_write(struct w1_slave *sl, int addr, int len, const u8 *data)
{
--
2.34.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 03/15] w1: ds28e04: correct kerneldoc annotation
2023-04-15 10:42 [PATCH 01/15] w1: ds2408: drop kerneldoc annotation Krzysztof Kozlowski
2023-04-15 10:42 ` [PATCH 02/15] w1: ds2433: correct " Krzysztof Kozlowski
@ 2023-04-15 10:42 ` Krzysztof Kozlowski
2023-04-15 16:07 ` Randy Dunlap
2023-04-15 10:42 ` [PATCH 04/15] w1: minor white-space and code style fixes Krzysztof Kozlowski
` (13 subsequent siblings)
15 siblings, 1 reply; 23+ messages in thread
From: Krzysztof Kozlowski @ 2023-04-15 10:42 UTC (permalink / raw)
To: Krzysztof Kozlowski, linux-kernel
Cc: Evgeniy Polyakov, Greg Kroah-Hartman, Arnd Bergmann,
Olof Johansson, soc, linux-arm-kernel
Correct kerneldoc comments (or drop annotation) to fix:
w1_ds28e04.c:57: warning: This comment starts with '/**', but isn't a kernel-doc comment.
w1_ds28e04.c:149: warning: This comment starts with '/**', but isn't a kernel-doc comment.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
drivers/w1/slaves/w1_ds28e04.c | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/drivers/w1/slaves/w1_ds28e04.c b/drivers/w1/slaves/w1_ds28e04.c
index 6cef6e2edb89..f54d6afd79c3 100644
--- a/drivers/w1/slaves/w1_ds28e04.c
+++ b/drivers/w1/slaves/w1_ds28e04.c
@@ -53,7 +53,7 @@ struct w1_f1C_data {
u32 validcrc;
};
-/**
+/*
* Check the file size bounds and adjusts count as needed.
* This would not be needed if the file size didn't reset to 0 after a write.
*/
@@ -146,16 +146,17 @@ static ssize_t eeprom_read(struct file *filp, struct kobject *kobj,
}
/**
- * Writes to the scratchpad and reads it back for verification.
+ * w1_f1C_write() - Writes to the scratchpad and reads it back for verification.
+ * @sl: The slave structure
+ * @addr: Address for the write
+ * @len: length must be <= (W1_PAGE_SIZE - (addr & W1_PAGE_MASK))
+ * @data: The data to write
+ *
* Then copies the scratchpad to EEPROM.
* The data must be on one page.
* The master must be locked.
*
- * @param sl The slave structure
- * @param addr Address for the write
- * @param len length must be <= (W1_PAGE_SIZE - (addr & W1_PAGE_MASK))
- * @param data The data to write
- * @return 0=Success -1=failure
+ * Return: 0=Success, -1=failure
*/
static int w1_f1C_write(struct w1_slave *sl, int addr, int len, const u8 *data)
{
--
2.34.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 04/15] w1: minor white-space and code style fixes
2023-04-15 10:42 [PATCH 01/15] w1: ds2408: drop kerneldoc annotation Krzysztof Kozlowski
2023-04-15 10:42 ` [PATCH 02/15] w1: ds2433: correct " Krzysztof Kozlowski
2023-04-15 10:42 ` [PATCH 03/15] w1: ds28e04: " Krzysztof Kozlowski
@ 2023-04-15 10:42 ` Krzysztof Kozlowski
2023-04-15 10:42 ` [PATCH 4/4] w1: omap-hdq: allow compile testing Krzysztof Kozlowski
` (12 subsequent siblings)
15 siblings, 0 replies; 23+ messages in thread
From: Krzysztof Kozlowski @ 2023-04-15 10:42 UTC (permalink / raw)
To: Krzysztof Kozlowski, linux-kernel
Cc: Evgeniy Polyakov, Greg Kroah-Hartman, Arnd Bergmann,
Olof Johansson, soc, linux-arm-kernel
Correct several coding convention violations around white-spaces:
ERROR: spaces required around that '=' (ctx:VxV)
WARNING: Missing a blank line after declarations
ERROR: "foo* bar" should be "foo *bar"
ERROR: "(foo*)" should be "(foo *)"
WARNING: Block comments use * on subsequent lines
WARNING: Block comments use a trailing */ on a separate line
WARNING: please, no space before tabs
WARNING: Missing a blank line after declarations
ERROR: open brace '{' following struct go on the same line
ERROR: that open brace { should be on the previous line
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
drivers/w1/masters/ds2482.c | 6 ++----
drivers/w1/masters/ds2490.c | 13 +++++++++----
drivers/w1/masters/matrox_w1.c | 3 +--
drivers/w1/slaves/w1_ds2406.c | 31 ++++++++++++++++---------------
drivers/w1/slaves/w1_ds2408.c | 10 +++++-----
drivers/w1/slaves/w1_ds2413.c | 6 ++++--
drivers/w1/slaves/w1_ds2433.c | 2 +-
drivers/w1/slaves/w1_ds2780.c | 1 +
drivers/w1/slaves/w1_ds2781.c | 1 +
drivers/w1/slaves/w1_ds28e04.c | 6 ++++--
drivers/w1/slaves/w1_ds28e17.c | 2 +-
11 files changed, 45 insertions(+), 36 deletions(-)
diff --git a/drivers/w1/masters/ds2482.c b/drivers/w1/masters/ds2482.c
index 3d8b51316bef..806e352c8292 100644
--- a/drivers/w1/masters/ds2482.c
+++ b/drivers/w1/masters/ds2482.c
@@ -78,10 +78,8 @@ MODULE_PARM_DESC(extra_config, "Extra Configuration settings 1=APU,2=PPM,3=SPU,8
* To set the channel, write the value at the index of the channel.
* Read and compare against the corresponding value to verify the change.
*/
-static const u8 ds2482_chan_wr[8] =
- { 0xF0, 0xE1, 0xD2, 0xC3, 0xB4, 0xA5, 0x96, 0x87 };
-static const u8 ds2482_chan_rd[8] =
- { 0xB8, 0xB1, 0xAA, 0xA3, 0x9C, 0x95, 0x8E, 0x87 };
+static const u8 ds2482_chan_wr[8] = { 0xF0, 0xE1, 0xD2, 0xC3, 0xB4, 0xA5, 0x96, 0x87 };
+static const u8 ds2482_chan_rd[8] = { 0xB8, 0xB1, 0xAA, 0xA3, 0x9C, 0x95, 0x8E, 0x87 };
/*
diff --git a/drivers/w1/masters/ds2490.c b/drivers/w1/masters/ds2490.c
index 0eb560fc0153..5f5b97e24700 100644
--- a/drivers/w1/masters/ds2490.c
+++ b/drivers/w1/masters/ds2490.c
@@ -304,6 +304,7 @@ static void ds_reset_device(struct ds_device *dev)
if (dev->spu_sleep) {
/* lower 4 bits are 0, see ds_set_pullup */
u8 del = dev->spu_sleep>>4;
+
if (ds_send_control(dev, COMM_SET_DURATION | COMM_IM, del))
dev_err(&dev->udev->dev,
"%s: Error setting duration\n", __func__);
@@ -731,7 +732,8 @@ static void ds9490r_search(void *data, struct w1_master *master,
break;
if (st.data_in_buffer_status) {
- /* Bulk in can receive partial ids, but when it does
+ /*
+ * Bulk in can receive partial ids, but when it does
* they fail crc and will be discarded anyway.
* That has only been seen when status in buffer
* is 0 and bulk is read anyway, so don't read
@@ -743,8 +745,10 @@ static void ds9490r_search(void *data, struct w1_master *master,
break;
for (i = 0; i < err/8; ++i) {
found_ids[found++] = buf[i];
- /* can't know if there will be a discrepancy
- * value after until the next id */
+ /*
+ * can't know if there will be a discrepancy
+ * value after until the next id
+ */
if (found == search_limit) {
master->search_id = buf[i];
break;
@@ -760,7 +764,8 @@ static void ds9490r_search(void *data, struct w1_master *master,
if (found <= search_limit) {
master->search_id = 0;
} else if (!test_bit(W1_WARN_MAX_COUNT, &master->flags)) {
- /* Only max_slave_count will be scanned in a search,
+ /*
+ * Only max_slave_count will be scanned in a search,
* but it will start where it left off next search
* until all ids are identified and then it will start
* over. A continued search will report the previous
diff --git a/drivers/w1/masters/matrox_w1.c b/drivers/w1/masters/matrox_w1.c
index ee716c715710..94a1f3fa2dc3 100644
--- a/drivers/w1/masters/matrox_w1.c
+++ b/drivers/w1/masters/matrox_w1.c
@@ -39,8 +39,7 @@
#define MATROX_GET_DATA 0x2B
#define MATROX_CURSOR_CTL 0x06
-struct matrox_device
-{
+struct matrox_device {
void __iomem *base_addr;
void __iomem *port_index;
void __iomem *port_data;
diff --git a/drivers/w1/slaves/w1_ds2406.c b/drivers/w1/slaves/w1_ds2406.c
index 6c269af73c80..3bb88b51fe2b 100644
--- a/drivers/w1/slaves/w1_ds2406.c
+++ b/drivers/w1/slaves/w1_ds2406.c
@@ -27,11 +27,11 @@ static ssize_t w1_f12_read_state(
struct bin_attribute *bin_attr,
char *buf, loff_t off, size_t count)
{
- u8 w1_buf[6]={W1_F12_FUNC_READ_STATUS, 7, 0, 0, 0, 0};
+ u8 w1_buf[6] = {W1_F12_FUNC_READ_STATUS, 7, 0, 0, 0, 0};
struct w1_slave *sl = kobj_to_w1_slave(kobj);
- u16 crc=0;
+ u16 crc = 0;
int i;
- ssize_t rtnval=1;
+ ssize_t rtnval = 1;
if (off != 0)
return 0;
@@ -47,12 +47,12 @@ static ssize_t w1_f12_read_state(
w1_write_block(sl->master, w1_buf, 3);
w1_read_block(sl->master, w1_buf+3, 3);
- for (i=0; i<6; i++)
- crc=crc16_byte(crc, w1_buf[i]);
- if (crc==0xb001) /* good read? */
- *buf=((w1_buf[3]>>5)&3)|0x30;
+ for (i = 0; i < 6; i++)
+ crc = crc16_byte(crc, w1_buf[i]);
+ if (crc == 0xb001) /* good read? */
+ *buf = ((w1_buf[3]>>5)&3)|0x30;
else
- rtnval=-EIO;
+ rtnval = -EIO;
mutex_unlock(&sl->master->bus_mutex);
@@ -65,10 +65,10 @@ static ssize_t w1_f12_write_output(
char *buf, loff_t off, size_t count)
{
struct w1_slave *sl = kobj_to_w1_slave(kobj);
- u8 w1_buf[6]={W1_F12_FUNC_WRITE_STATUS, 7, 0, 0, 0, 0};
- u16 crc=0;
+ u8 w1_buf[6] = {W1_F12_FUNC_WRITE_STATUS, 7, 0, 0, 0, 0};
+ u16 crc = 0;
int i;
- ssize_t rtnval=1;
+ ssize_t rtnval = 1;
if (count != 1 || off != 0)
return -EFAULT;
@@ -83,12 +83,12 @@ static ssize_t w1_f12_write_output(
w1_buf[3] = (((*buf)&3)<<5)|0x1F;
w1_write_block(sl->master, w1_buf, 4);
w1_read_block(sl->master, w1_buf+4, 2);
- for (i=0; i<6; i++)
- crc=crc16_byte(crc, w1_buf[i]);
- if (crc==0xb001) /* good read? */
+ for (i = 0; i < 6; i++)
+ crc = crc16_byte(crc, w1_buf[i]);
+ if (crc == 0xb001) /* good read? */
w1_write_8(sl->master, 0xFF);
else
- rtnval=-EIO;
+ rtnval = -EIO;
mutex_unlock(&sl->master->bus_mutex);
return rtnval;
@@ -133,6 +133,7 @@ static int w1_f12_add_slave(struct w1_slave *sl)
static void w1_f12_remove_slave(struct w1_slave *sl)
{
int i;
+
for (i = NB_SYSFS_BIN_FILES - 1; i >= 0; --i)
sysfs_remove_bin_file(&sl->dev.kobj,
&(w1_f12_sysfs_bin_files[i]));
diff --git a/drivers/w1/slaves/w1_ds2408.c b/drivers/w1/slaves/w1_ds2408.c
index 7fa911989193..56f822a1dfdb 100644
--- a/drivers/w1/slaves/w1_ds2408.c
+++ b/drivers/w1/slaves/w1_ds2408.c
@@ -35,12 +35,12 @@
#define W1_F29_SUCCESS_CONFIRM_BYTE 0xAA
-static int _read_reg(struct w1_slave *sl, u8 address, unsigned char* buf)
+static int _read_reg(struct w1_slave *sl, u8 address, unsigned char *buf)
{
u8 wrbuf[3];
- dev_dbg(&sl->dev,
- "Reading with slave: %p, reg addr: %0#4x, buff addr: %p",
- sl, (unsigned int)address, buf);
+
+ dev_dbg(&sl->dev, "Reading with slave: %p, reg addr: %0#4x, buff addr: %p",
+ sl, (unsigned int)address, buf);
if (!buf)
return -EINVAL;
@@ -292,7 +292,7 @@ static int w1_f29_disable_test_mode(struct w1_slave *sl)
{
int res;
u8 magic[10] = {0x96, };
- u64 rn = le64_to_cpu(*((u64*)&sl->reg_num));
+ u64 rn = le64_to_cpu(*((u64 *)&sl->reg_num));
memcpy(&magic[1], &rn, 8);
magic[9] = 0x3C;
diff --git a/drivers/w1/slaves/w1_ds2413.c b/drivers/w1/slaves/w1_ds2413.c
index c8cfac555b48..bf4a72aae28a 100644
--- a/drivers/w1/slaves/w1_ds2413.c
+++ b/drivers/w1/slaves/w1_ds2413.c
@@ -99,8 +99,10 @@ static ssize_t output_write(struct file *filp, struct kobject *kobj,
if (w1_reset_select_slave(sl))
goto out;
- /* according to the DS2413 datasheet the most significant 6 bits
- should be set to "1"s, so do it now */
+ /*
+ * according to the DS2413 datasheet the most significant 6 bits
+ * should be set to "1"s, so do it now
+ */
*buf = *buf | 0xFC;
while (retries--) {
diff --git a/drivers/w1/slaves/w1_ds2433.c b/drivers/w1/slaves/w1_ds2433.c
index 6134ca2f37fe..23cd099d032b 100644
--- a/drivers/w1/slaves/w1_ds2433.c
+++ b/drivers/w1/slaves/w1_ds2433.c
@@ -115,7 +115,7 @@ static ssize_t eeprom_read(struct file *filp, struct kobject *kobj,
}
memcpy(buf, &data->memory[off], count);
-#else /* CONFIG_W1_SLAVE_DS2433_CRC */
+#else /* CONFIG_W1_SLAVE_DS2433_CRC */
/* read directly from the EEPROM */
if (w1_reset_select_slave(sl)) {
diff --git a/drivers/w1/slaves/w1_ds2780.c b/drivers/w1/slaves/w1_ds2780.c
index 9dcb5a54f7fc..3cde1bb1886b 100644
--- a/drivers/w1/slaves/w1_ds2780.c
+++ b/drivers/w1/slaves/w1_ds2780.c
@@ -91,6 +91,7 @@ static ssize_t w1_slave_read(struct file *filp, struct kobject *kobj,
loff_t off, size_t count)
{
struct device *dev = kobj_to_dev(kobj);
+
return w1_ds2780_io(dev, buf, off, count, 0);
}
diff --git a/drivers/w1/slaves/w1_ds2781.c b/drivers/w1/slaves/w1_ds2781.c
index 2cb7c020b607..e418484b4a49 100644
--- a/drivers/w1/slaves/w1_ds2781.c
+++ b/drivers/w1/slaves/w1_ds2781.c
@@ -88,6 +88,7 @@ static ssize_t w1_slave_read(struct file *filp, struct kobject *kobj,
loff_t off, size_t count)
{
struct device *dev = kobj_to_dev(kobj);
+
return w1_ds2781_io(dev, buf, off, count, 0);
}
diff --git a/drivers/w1/slaves/w1_ds28e04.c b/drivers/w1/slaves/w1_ds28e04.c
index f54d6afd79c3..2854b8b9e93f 100644
--- a/drivers/w1/slaves/w1_ds28e04.c
+++ b/drivers/w1/slaves/w1_ds28e04.c
@@ -198,8 +198,10 @@ static int w1_f1C_write(struct w1_slave *sl, int addr, int len, const u8 *data)
wrbuf[3] = es;
for (i = 0; i < sizeof(wrbuf); ++i) {
- /* issue 10ms strong pullup (or delay) on the last byte
- for writing the data from the scratchpad to EEPROM */
+ /*
+ * issue 10ms strong pullup (or delay) on the last byte
+ * for writing the data from the scratchpad to EEPROM
+ */
if (w1_strong_pullup && i == sizeof(wrbuf)-1)
w1_next_pullup(sl->master, tm);
diff --git a/drivers/w1/slaves/w1_ds28e17.c b/drivers/w1/slaves/w1_ds28e17.c
index aed10b72fc99..fdbaf77620ac 100644
--- a/drivers/w1/slaves/w1_ds28e17.c
+++ b/drivers/w1/slaves/w1_ds28e17.c
@@ -59,7 +59,7 @@ MODULE_PARM_DESC(stretch, "Default I2C stretch value to be set when a DS28E17 is
/*
* Maximum number of I2C bytes to transfer within one CRC16 protected onewire
* command.
- * */
+ */
#define W1_F19_WRITE_DATA_LIMIT 255
/* Maximum number of I2C bytes to read with one onewire command. */
--
2.34.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 4/4] w1: omap-hdq: allow compile testing
2023-04-15 10:42 [PATCH 01/15] w1: ds2408: drop kerneldoc annotation Krzysztof Kozlowski
` (2 preceding siblings ...)
2023-04-15 10:42 ` [PATCH 04/15] w1: minor white-space and code style fixes Krzysztof Kozlowski
@ 2023-04-15 10:42 ` Krzysztof Kozlowski
2023-04-15 15:18 ` Greg Kroah-Hartman
2023-04-15 10:42 ` [PATCH 05/15] w1: use octal for file permissions Krzysztof Kozlowski
` (11 subsequent siblings)
15 siblings, 1 reply; 23+ messages in thread
From: Krzysztof Kozlowski @ 2023-04-15 10:42 UTC (permalink / raw)
To: Krzysztof Kozlowski, linux-kernel
Cc: Evgeniy Polyakov, Greg Kroah-Hartman, Arnd Bergmann,
Olof Johansson, soc, linux-arm-kernel
omap-hdq does not depend on anything from ARCH_OMAP for building.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
drivers/w1/masters/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/w1/masters/Kconfig b/drivers/w1/masters/Kconfig
index 692cac3ff0ee..ad316573288a 100644
--- a/drivers/w1/masters/Kconfig
+++ b/drivers/w1/masters/Kconfig
@@ -53,7 +53,7 @@ config W1_MASTER_GPIO
config HDQ_MASTER_OMAP
tristate "OMAP HDQ driver"
- depends on ARCH_OMAP
+ depends on ARCH_OMAP || COMPILE_TEST
help
Say Y here if you want support for the 1-wire or HDQ Interface
on an OMAP processor.
--
2.34.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 05/15] w1: use octal for file permissions
2023-04-15 10:42 [PATCH 01/15] w1: ds2408: drop kerneldoc annotation Krzysztof Kozlowski
` (3 preceding siblings ...)
2023-04-15 10:42 ` [PATCH 4/4] w1: omap-hdq: allow compile testing Krzysztof Kozlowski
@ 2023-04-15 10:42 ` Krzysztof Kozlowski
2023-04-15 10:42 ` [PATCH 06/15] w1: ds2433: do not use assignment in if condition Krzysztof Kozlowski
` (10 subsequent siblings)
15 siblings, 0 replies; 23+ messages in thread
From: Krzysztof Kozlowski @ 2023-04-15 10:42 UTC (permalink / raw)
To: Krzysztof Kozlowski, linux-kernel
Cc: Evgeniy Polyakov, Greg Kroah-Hartman, Arnd Bergmann,
Olof Johansson, soc, linux-arm-kernel
Improve code readability and checkpatch warnings:
WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
drivers/w1/masters/ds2482.c | 2 +-
drivers/w1/masters/omap_hdq.c | 2 +-
drivers/w1/slaves/w1_ds2406.c | 4 ++--
drivers/w1/slaves/w1_ds2413.c | 2 +-
drivers/w1/slaves/w1_ds2805.c | 2 +-
drivers/w1/slaves/w1_ds28e17.c | 4 ++--
6 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/w1/masters/ds2482.c b/drivers/w1/masters/ds2482.c
index 806e352c8292..90c0a33747db 100644
--- a/drivers/w1/masters/ds2482.c
+++ b/drivers/w1/masters/ds2482.c
@@ -36,7 +36,7 @@ MODULE_PARM_DESC(active_pullup, "Active pullup (apply to all buses): " \
/* extra configurations - e.g. 1WS */
static int extra_config;
-module_param(extra_config, int, S_IRUGO | S_IWUSR);
+module_param(extra_config, int, 0644);
MODULE_PARM_DESC(extra_config, "Extra Configuration settings 1=APU,2=PPM,3=SPU,8=1WS");
/*
diff --git a/drivers/w1/masters/omap_hdq.c b/drivers/w1/masters/omap_hdq.c
index bf2ec59c1f9d..ae3e504cd543 100644
--- a/drivers/w1/masters/omap_hdq.c
+++ b/drivers/w1/masters/omap_hdq.c
@@ -48,7 +48,7 @@
static DECLARE_WAIT_QUEUE_HEAD(hdq_wait_queue);
static int w1_id;
-module_param(w1_id, int, S_IRUSR);
+module_param(w1_id, int, 0400);
MODULE_PARM_DESC(w1_id, "1-wire id for the slave detection in HDQ mode");
struct hdq_data {
diff --git a/drivers/w1/slaves/w1_ds2406.c b/drivers/w1/slaves/w1_ds2406.c
index 3bb88b51fe2b..2f5926859b8b 100644
--- a/drivers/w1/slaves/w1_ds2406.c
+++ b/drivers/w1/slaves/w1_ds2406.c
@@ -99,7 +99,7 @@ static struct bin_attribute w1_f12_sysfs_bin_files[NB_SYSFS_BIN_FILES] = {
{
.attr = {
.name = "state",
- .mode = S_IRUGO,
+ .mode = 0444,
},
.size = 1,
.read = w1_f12_read_state,
@@ -107,7 +107,7 @@ static struct bin_attribute w1_f12_sysfs_bin_files[NB_SYSFS_BIN_FILES] = {
{
.attr = {
.name = "output",
- .mode = S_IRUGO | S_IWUSR | S_IWGRP,
+ .mode = 0664,
},
.size = 1,
.write = w1_f12_write_output,
diff --git a/drivers/w1/slaves/w1_ds2413.c b/drivers/w1/slaves/w1_ds2413.c
index bf4a72aae28a..739009806467 100644
--- a/drivers/w1/slaves/w1_ds2413.c
+++ b/drivers/w1/slaves/w1_ds2413.c
@@ -128,7 +128,7 @@ static ssize_t output_write(struct file *filp, struct kobject *kobj,
return bytes_written;
}
-static BIN_ATTR(output, S_IRUGO | S_IWUSR | S_IWGRP, NULL, output_write, 1);
+static BIN_ATTR(output, 0664, NULL, output_write, 1);
static struct bin_attribute *w1_f3a_bin_attrs[] = {
&bin_attr_state,
diff --git a/drivers/w1/slaves/w1_ds2805.c b/drivers/w1/slaves/w1_ds2805.c
index 6b5d12ba1b65..4c1a2c515317 100644
--- a/drivers/w1/slaves/w1_ds2805.c
+++ b/drivers/w1/slaves/w1_ds2805.c
@@ -264,7 +264,7 @@ static ssize_t w1_f0d_write_bin(struct file *filp, struct kobject *kobj,
static struct bin_attribute w1_f0d_bin_attr = {
.attr = {
.name = "eeprom",
- .mode = S_IRUGO | S_IWUSR,
+ .mode = 0644,
},
.size = W1_F0D_EEPROM_SIZE,
.read = w1_f0d_read_bin,
diff --git a/drivers/w1/slaves/w1_ds28e17.c b/drivers/w1/slaves/w1_ds28e17.c
index fdbaf77620ac..52261b54d842 100644
--- a/drivers/w1/slaves/w1_ds28e17.c
+++ b/drivers/w1/slaves/w1_ds28e17.c
@@ -31,12 +31,12 @@ MODULE_ALIAS("w1-family-" __stringify(W1_FAMILY_DS28E17));
/* Default I2C speed to be set when a DS28E17 is detected. */
static int i2c_speed = 100;
-module_param_named(speed, i2c_speed, int, (S_IRUSR | S_IWUSR));
+module_param_named(speed, i2c_speed, int, 0600);
MODULE_PARM_DESC(speed, "Default I2C speed to be set when a DS28E17 is detected");
/* Default I2C stretch value to be set when a DS28E17 is detected. */
static char i2c_stretch = 1;
-module_param_named(stretch, i2c_stretch, byte, (S_IRUSR | S_IWUSR));
+module_param_named(stretch, i2c_stretch, byte, 0600);
MODULE_PARM_DESC(stretch, "Default I2C stretch value to be set when a DS28E17 is detected");
/* DS28E17 device command codes. */
--
2.34.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 06/15] w1: ds2433: do not use assignment in if condition
2023-04-15 10:42 [PATCH 01/15] w1: ds2408: drop kerneldoc annotation Krzysztof Kozlowski
` (4 preceding siblings ...)
2023-04-15 10:42 ` [PATCH 05/15] w1: use octal for file permissions Krzysztof Kozlowski
@ 2023-04-15 10:42 ` Krzysztof Kozlowski
2023-04-15 10:42 ` [PATCH 07/15] w1: ds2482: drop unnecessary header Krzysztof Kozlowski
` (9 subsequent siblings)
15 siblings, 0 replies; 23+ messages in thread
From: Krzysztof Kozlowski @ 2023-04-15 10:42 UTC (permalink / raw)
To: Krzysztof Kozlowski, linux-kernel
Cc: Evgeniy Polyakov, Greg Kroah-Hartman, Arnd Bergmann,
Olof Johansson, soc, linux-arm-kernel
Assignments in if condition are less readable and error-prone. Fixes
also checkpatch warning:
ERROR: do not use assignment in if condition
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
drivers/w1/slaves/w1_ds2433.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/w1/slaves/w1_ds2433.c b/drivers/w1/slaves/w1_ds2433.c
index 23cd099d032b..9f21fd98f799 100644
--- a/drivers/w1/slaves/w1_ds2433.c
+++ b/drivers/w1/slaves/w1_ds2433.c
@@ -98,7 +98,8 @@ static ssize_t eeprom_read(struct file *filp, struct kobject *kobj,
u8 wrbuf[3];
#endif
- if ((count = w1_f23_fix_count(off, count, W1_EEPROM_SIZE)) == 0)
+ count = w1_f23_fix_count(off, count, W1_EEPROM_SIZE);
+ if (!count)
return 0;
mutex_lock(&sl->master->bus_mutex);
@@ -208,7 +209,8 @@ static ssize_t eeprom_write(struct file *filp, struct kobject *kobj,
struct w1_slave *sl = kobj_to_w1_slave(kobj);
int addr, len, idx;
- if ((count = w1_f23_fix_count(off, count, W1_EEPROM_SIZE)) == 0)
+ count = w1_f23_fix_count(off, count, W1_EEPROM_SIZE);
+ if (!count)
return 0;
#ifdef CONFIG_W1_SLAVE_DS2433_CRC
--
2.34.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 07/15] w1: ds2482: drop unnecessary header
2023-04-15 10:42 [PATCH 01/15] w1: ds2408: drop kerneldoc annotation Krzysztof Kozlowski
` (5 preceding siblings ...)
2023-04-15 10:42 ` [PATCH 06/15] w1: ds2433: do not use assignment in if condition Krzysztof Kozlowski
@ 2023-04-15 10:42 ` Krzysztof Kozlowski
2023-04-15 10:42 ` [PATCH 08/15] w1: ds2482: do not use assignment in if condition Krzysztof Kozlowski
` (8 subsequent siblings)
15 siblings, 0 replies; 23+ messages in thread
From: Krzysztof Kozlowski @ 2023-04-15 10:42 UTC (permalink / raw)
To: Krzysztof Kozlowski, linux-kernel
Cc: Evgeniy Polyakov, Greg Kroah-Hartman, Arnd Bergmann,
Olof Johansson, soc, linux-arm-kernel
linux/delay.h is already included, so drop asm header to also fix
checkpatch:
WARNING: Use #include <linux/delay.h> instead of <asm/delay.h>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
drivers/w1/masters/ds2482.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/w1/masters/ds2482.c b/drivers/w1/masters/ds2482.c
index 90c0a33747db..7e915b71045d 100644
--- a/drivers/w1/masters/ds2482.c
+++ b/drivers/w1/masters/ds2482.c
@@ -15,7 +15,6 @@
#include <linux/slab.h>
#include <linux/i2c.h>
#include <linux/delay.h>
-#include <asm/delay.h>
#include <linux/w1.h>
--
2.34.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 08/15] w1: ds2482: do not use assignment in if condition
2023-04-15 10:42 [PATCH 01/15] w1: ds2408: drop kerneldoc annotation Krzysztof Kozlowski
` (6 preceding siblings ...)
2023-04-15 10:42 ` [PATCH 07/15] w1: ds2482: drop unnecessary header Krzysztof Kozlowski
@ 2023-04-15 10:42 ` Krzysztof Kozlowski
2023-04-15 10:42 ` [PATCH 09/15] w1: matrox: switch from asm to linux header Krzysztof Kozlowski
` (7 subsequent siblings)
15 siblings, 0 replies; 23+ messages in thread
From: Krzysztof Kozlowski @ 2023-04-15 10:42 UTC (permalink / raw)
To: Krzysztof Kozlowski, linux-kernel
Cc: Evgeniy Polyakov, Greg Kroah-Hartman, Arnd Bergmann,
Olof Johansson, soc, linux-arm-kernel
Assignments in if condition are less readable and error-prone. Fixes
also checkpatch warning:
ERROR: do not use assignment in if condition
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
drivers/w1/masters/ds2482.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/w1/masters/ds2482.c b/drivers/w1/masters/ds2482.c
index 7e915b71045d..f4ad644a7abf 100644
--- a/drivers/w1/masters/ds2482.c
+++ b/drivers/w1/masters/ds2482.c
@@ -451,7 +451,8 @@ static int ds2482_probe(struct i2c_client *client)
I2C_FUNC_SMBUS_BYTE))
return -ENODEV;
- if (!(data = kzalloc(sizeof(struct ds2482_data), GFP_KERNEL))) {
+ data = kzalloc(sizeof(struct ds2482_data), GFP_KERNEL);
+ if (!data) {
err = -ENOMEM;
goto exit;
}
--
2.34.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 09/15] w1: matrox: switch from asm to linux header
2023-04-15 10:42 [PATCH 01/15] w1: ds2408: drop kerneldoc annotation Krzysztof Kozlowski
` (7 preceding siblings ...)
2023-04-15 10:42 ` [PATCH 08/15] w1: ds2482: do not use assignment in if condition Krzysztof Kozlowski
@ 2023-04-15 10:42 ` Krzysztof Kozlowski
2023-04-15 10:42 ` [PATCH 10/15] w1: matrox: use inline over __inline__ Krzysztof Kozlowski
` (6 subsequent siblings)
15 siblings, 0 replies; 23+ messages in thread
From: Krzysztof Kozlowski @ 2023-04-15 10:42 UTC (permalink / raw)
To: Krzysztof Kozlowski, linux-kernel
Cc: Evgeniy Polyakov, Greg Kroah-Hartman, Arnd Bergmann,
Olof Johansson, soc, linux-arm-kernel
linux/io.h is preferred over asm/io.h:
WARNING: Use #include <linux/io.h> instead of <asm/io.h>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
drivers/w1/masters/matrox_w1.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/w1/masters/matrox_w1.c b/drivers/w1/masters/matrox_w1.c
index 94a1f3fa2dc3..662108b1d806 100644
--- a/drivers/w1/masters/matrox_w1.c
+++ b/drivers/w1/masters/matrox_w1.c
@@ -7,7 +7,7 @@
#include <asm/types.h>
#include <linux/atomic.h>
-#include <asm/io.h>
+#include <linux/io.h>
#include <linux/delay.h>
#include <linux/kernel.h>
--
2.34.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 10/15] w1: matrox: use inline over __inline__
2023-04-15 10:42 [PATCH 01/15] w1: ds2408: drop kerneldoc annotation Krzysztof Kozlowski
` (8 preceding siblings ...)
2023-04-15 10:42 ` [PATCH 09/15] w1: matrox: switch from asm to linux header Krzysztof Kozlowski
@ 2023-04-15 10:42 ` Krzysztof Kozlowski
2023-04-15 10:43 ` [PATCH 11/15] w1: matrox: remove unnecessary ENOMEM messages Krzysztof Kozlowski
` (5 subsequent siblings)
15 siblings, 0 replies; 23+ messages in thread
From: Krzysztof Kozlowski @ 2023-04-15 10:42 UTC (permalink / raw)
To: Krzysztof Kozlowski, linux-kernel
Cc: Evgeniy Polyakov, Greg Kroah-Hartman, Arnd Bergmann,
Olof Johansson, soc, linux-arm-kernel
Switch to inline as preferred by coding style:
WARNING: plain inline is preferred over __inline__
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
drivers/w1/masters/matrox_w1.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/w1/masters/matrox_w1.c b/drivers/w1/masters/matrox_w1.c
index 662108b1d806..fb38d92b2f43 100644
--- a/drivers/w1/masters/matrox_w1.c
+++ b/drivers/w1/masters/matrox_w1.c
@@ -63,7 +63,7 @@ struct matrox_device {
*
* Port mapping.
*/
-static __inline__ u8 matrox_w1_read_reg(struct matrox_device *dev, u8 reg)
+static inline u8 matrox_w1_read_reg(struct matrox_device *dev, u8 reg)
{
u8 ret;
@@ -74,7 +74,7 @@ static __inline__ u8 matrox_w1_read_reg(struct matrox_device *dev, u8 reg)
return ret;
}
-static __inline__ void matrox_w1_write_reg(struct matrox_device *dev, u8 reg, u8 val)
+static inline void matrox_w1_write_reg(struct matrox_device *dev, u8 reg, u8 val)
{
writeb(reg, dev->port_index);
writeb(val, dev->port_data);
--
2.34.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 11/15] w1: matrox: remove unnecessary ENOMEM messages
2023-04-15 10:42 [PATCH 01/15] w1: ds2408: drop kerneldoc annotation Krzysztof Kozlowski
` (9 preceding siblings ...)
2023-04-15 10:42 ` [PATCH 10/15] w1: matrox: use inline over __inline__ Krzysztof Kozlowski
@ 2023-04-15 10:43 ` Krzysztof Kozlowski
2023-04-15 10:43 ` [PATCH 12/15] w1: omap-hdq: allow compile testing Krzysztof Kozlowski
` (4 subsequent siblings)
15 siblings, 0 replies; 23+ messages in thread
From: Krzysztof Kozlowski @ 2023-04-15 10:43 UTC (permalink / raw)
To: Krzysztof Kozlowski, linux-kernel
Cc: Evgeniy Polyakov, Greg Kroah-Hartman, Arnd Bergmann,
Olof Johansson, soc, linux-arm-kernel
Core already prints detailed reports on out of memory:
WARNING: Possible unnecessary 'out of memory' message
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
drivers/w1/masters/matrox_w1.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/w1/masters/matrox_w1.c b/drivers/w1/masters/matrox_w1.c
index fb38d92b2f43..2852cd2dc67c 100644
--- a/drivers/w1/masters/matrox_w1.c
+++ b/drivers/w1/masters/matrox_w1.c
@@ -122,13 +122,8 @@ static int matrox_w1_probe(struct pci_dev *pdev, const struct pci_device_id *ent
dev = kzalloc(sizeof(struct matrox_device) +
sizeof(struct w1_bus_master), GFP_KERNEL);
- if (!dev) {
- dev_err(&pdev->dev,
- "%s: Failed to create new matrox_device object.\n",
- __func__);
+ if (!dev)
return -ENOMEM;
- }
-
dev->bus_master = (struct w1_bus_master *)(dev + 1);
--
2.34.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 12/15] w1: omap-hdq: allow compile testing
2023-04-15 10:42 [PATCH 01/15] w1: ds2408: drop kerneldoc annotation Krzysztof Kozlowski
` (10 preceding siblings ...)
2023-04-15 10:43 ` [PATCH 11/15] w1: matrox: remove unnecessary ENOMEM messages Krzysztof Kozlowski
@ 2023-04-15 10:43 ` Krzysztof Kozlowski
2023-04-15 16:05 ` Randy Dunlap
2023-04-15 10:43 ` [PATCH 13/15] w1: omap-hdq: add SPDX tag Krzysztof Kozlowski
` (3 subsequent siblings)
15 siblings, 1 reply; 23+ messages in thread
From: Krzysztof Kozlowski @ 2023-04-15 10:43 UTC (permalink / raw)
To: Krzysztof Kozlowski, linux-kernel
Cc: Evgeniy Polyakov, Greg Kroah-Hartman, Arnd Bergmann,
Olof Johansson, soc, linux-arm-kernel
omap-hdq does not depend on anything from ARCH_OMAP for building.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
drivers/w1/masters/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/w1/masters/Kconfig b/drivers/w1/masters/Kconfig
index 692cac3ff0ee..ad316573288a 100644
--- a/drivers/w1/masters/Kconfig
+++ b/drivers/w1/masters/Kconfig
@@ -53,7 +53,7 @@ config W1_MASTER_GPIO
config HDQ_MASTER_OMAP
tristate "OMAP HDQ driver"
- depends on ARCH_OMAP
+ depends on ARCH_OMAP || COMPILE_TEST
help
Say Y here if you want support for the 1-wire or HDQ Interface
on an OMAP processor.
--
2.34.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 13/15] w1: omap-hdq: add SPDX tag
2023-04-15 10:42 [PATCH 01/15] w1: ds2408: drop kerneldoc annotation Krzysztof Kozlowski
` (11 preceding siblings ...)
2023-04-15 10:43 ` [PATCH 12/15] w1: omap-hdq: allow compile testing Krzysztof Kozlowski
@ 2023-04-15 10:43 ` Krzysztof Kozlowski
2023-04-15 10:43 ` [PATCH 14/15] w1: omap-hdq: remove unnecessary ENOMEM messages Krzysztof Kozlowski
` (2 subsequent siblings)
15 siblings, 0 replies; 23+ messages in thread
From: Krzysztof Kozlowski @ 2023-04-15 10:43 UTC (permalink / raw)
To: Krzysztof Kozlowski, linux-kernel
Cc: Evgeniy Polyakov, Greg Kroah-Hartman, Arnd Bergmann,
Olof Johansson, soc, linux-arm-kernel
Replace GPLv2 license text with SPDX and drop unnecessary file name in
comment to fix checkpatch warnings:
WARNING: Missing or malformed SPDX-License-Identifier tag in line 1
WARNING: It's generally not useful to have the filename in the file
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
drivers/w1/masters/omap_hdq.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/w1/masters/omap_hdq.c b/drivers/w1/masters/omap_hdq.c
index ae3e504cd543..826207c24bd0 100644
--- a/drivers/w1/masters/omap_hdq.c
+++ b/drivers/w1/masters/omap_hdq.c
@@ -1,12 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0-only
/*
- * drivers/w1/masters/omap_hdq.c
- *
* Copyright (C) 2007,2012 Texas Instruments, Inc.
- *
- * This file is licensed under the terms of the GNU General Public License
- * version 2. This program is licensed "as is" without any warranty of any
- * kind, whether express or implied.
- *
*/
#include <linux/kernel.h>
#include <linux/module.h>
--
2.34.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 14/15] w1: omap-hdq: remove unnecessary ENOMEM messages
2023-04-15 10:42 [PATCH 01/15] w1: ds2408: drop kerneldoc annotation Krzysztof Kozlowski
` (12 preceding siblings ...)
2023-04-15 10:43 ` [PATCH 13/15] w1: omap-hdq: add SPDX tag Krzysztof Kozlowski
@ 2023-04-15 10:43 ` Krzysztof Kozlowski
2023-04-15 10:43 ` [PATCH 15/15] w1: gpio: " Krzysztof Kozlowski
2023-04-15 16:07 ` [PATCH 01/15] w1: ds2408: drop kerneldoc annotation Randy Dunlap
15 siblings, 0 replies; 23+ messages in thread
From: Krzysztof Kozlowski @ 2023-04-15 10:43 UTC (permalink / raw)
To: Krzysztof Kozlowski, linux-kernel
Cc: Evgeniy Polyakov, Greg Kroah-Hartman, Arnd Bergmann,
Olof Johansson, soc, linux-arm-kernel
Core already prints detailed reports on out of memory:
WARNING: Possible unnecessary 'out of memory' message
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
drivers/w1/masters/omap_hdq.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/w1/masters/omap_hdq.c b/drivers/w1/masters/omap_hdq.c
index 826207c24bd0..6a39b71eb718 100644
--- a/drivers/w1/masters/omap_hdq.c
+++ b/drivers/w1/masters/omap_hdq.c
@@ -573,10 +573,8 @@ static int omap_hdq_probe(struct platform_device *pdev)
const char *mode;
hdq_data = devm_kzalloc(dev, sizeof(*hdq_data), GFP_KERNEL);
- if (!hdq_data) {
- dev_dbg(&pdev->dev, "unable to allocate memory\n");
+ if (!hdq_data)
return -ENOMEM;
- }
hdq_data->dev = dev;
platform_set_drvdata(pdev, hdq_data);
--
2.34.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH 15/15] w1: gpio: remove unnecessary ENOMEM messages
2023-04-15 10:42 [PATCH 01/15] w1: ds2408: drop kerneldoc annotation Krzysztof Kozlowski
` (13 preceding siblings ...)
2023-04-15 10:43 ` [PATCH 14/15] w1: omap-hdq: remove unnecessary ENOMEM messages Krzysztof Kozlowski
@ 2023-04-15 10:43 ` Krzysztof Kozlowski
2023-04-15 16:07 ` [PATCH 01/15] w1: ds2408: drop kerneldoc annotation Randy Dunlap
15 siblings, 0 replies; 23+ messages in thread
From: Krzysztof Kozlowski @ 2023-04-15 10:43 UTC (permalink / raw)
To: Krzysztof Kozlowski, linux-kernel
Cc: Evgeniy Polyakov, Greg Kroah-Hartman, Arnd Bergmann,
Olof Johansson, soc, linux-arm-kernel
Core already prints detailed reports on out of memory:
WARNING: Possible unnecessary 'out of memory' message
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
drivers/w1/masters/w1-gpio.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/w1/masters/w1-gpio.c b/drivers/w1/masters/w1-gpio.c
index d4632aace402..ac7ad63f8f8d 100644
--- a/drivers/w1/masters/w1-gpio.c
+++ b/drivers/w1/masters/w1-gpio.c
@@ -101,10 +101,8 @@ static int w1_gpio_probe(struct platform_device *pdev)
master = devm_kzalloc(dev, sizeof(struct w1_bus_master),
GFP_KERNEL);
- if (!master) {
- dev_err(dev, "Out of memory\n");
+ if (!master)
return -ENOMEM;
- }
pdata->gpiod = devm_gpiod_get_index(dev, NULL, 0, gflags);
if (IS_ERR(pdata->gpiod)) {
--
2.34.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 23+ messages in thread
* Re: [PATCH 4/4] w1: omap-hdq: allow compile testing
2023-04-15 10:42 ` [PATCH 4/4] w1: omap-hdq: allow compile testing Krzysztof Kozlowski
@ 2023-04-15 15:18 ` Greg Kroah-Hartman
2023-04-16 7:18 ` Krzysztof Kozlowski
0 siblings, 1 reply; 23+ messages in thread
From: Greg Kroah-Hartman @ 2023-04-15 15:18 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: linux-kernel, Evgeniy Polyakov, Arnd Bergmann, Olof Johansson,
soc, linux-arm-kernel
On Sat, Apr 15, 2023 at 12:42:53PM +0200, Krzysztof Kozlowski wrote:
> omap-hdq does not depend on anything from ARCH_OMAP for building.
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
> drivers/w1/masters/Kconfig | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/w1/masters/Kconfig b/drivers/w1/masters/Kconfig
> index 692cac3ff0ee..ad316573288a 100644
> --- a/drivers/w1/masters/Kconfig
> +++ b/drivers/w1/masters/Kconfig
> @@ -53,7 +53,7 @@ config W1_MASTER_GPIO
>
> config HDQ_MASTER_OMAP
> tristate "OMAP HDQ driver"
> - depends on ARCH_OMAP
> + depends on ARCH_OMAP || COMPILE_TEST
> help
> Say Y here if you want support for the 1-wire or HDQ Interface
> on an OMAP processor.
> --
> 2.34.1
>
I'm guessing this shouldn't be part of this series?
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 12/15] w1: omap-hdq: allow compile testing
2023-04-15 10:43 ` [PATCH 12/15] w1: omap-hdq: allow compile testing Krzysztof Kozlowski
@ 2023-04-15 16:05 ` Randy Dunlap
2023-04-16 7:22 ` Krzysztof Kozlowski
0 siblings, 1 reply; 23+ messages in thread
From: Randy Dunlap @ 2023-04-15 16:05 UTC (permalink / raw)
To: Krzysztof Kozlowski, linux-kernel
Cc: Evgeniy Polyakov, Greg Kroah-Hartman, Arnd Bergmann,
Olof Johansson, soc, linux-arm-kernel
Hi,
On 4/15/23 03:43, Krzysztof Kozlowski wrote:
> omap-hdq does not depend on anything from ARCH_OMAP for building.
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
It appears that patches 4 and 12 are the same...
> ---
> drivers/w1/masters/Kconfig | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/w1/masters/Kconfig b/drivers/w1/masters/Kconfig
> index 692cac3ff0ee..ad316573288a 100644
> --- a/drivers/w1/masters/Kconfig
> +++ b/drivers/w1/masters/Kconfig
> @@ -53,7 +53,7 @@ config W1_MASTER_GPIO
>
> config HDQ_MASTER_OMAP
> tristate "OMAP HDQ driver"
> - depends on ARCH_OMAP
> + depends on ARCH_OMAP || COMPILE_TEST
> help
> Say Y here if you want support for the 1-wire or HDQ Interface
> on an OMAP processor.
--
~Randy
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 03/15] w1: ds28e04: correct kerneldoc annotation
2023-04-15 10:42 ` [PATCH 03/15] w1: ds28e04: " Krzysztof Kozlowski
@ 2023-04-15 16:07 ` Randy Dunlap
0 siblings, 0 replies; 23+ messages in thread
From: Randy Dunlap @ 2023-04-15 16:07 UTC (permalink / raw)
To: Krzysztof Kozlowski, linux-kernel
Cc: Evgeniy Polyakov, Greg Kroah-Hartman, Arnd Bergmann,
Olof Johansson, soc, linux-arm-kernel
On 4/15/23 03:42, Krzysztof Kozlowski wrote:
> Correct kerneldoc comments (or drop annotation) to fix:
>
> w1_ds28e04.c:57: warning: This comment starts with '/**', but isn't a kernel-doc comment.
> w1_ds28e04.c:149: warning: This comment starts with '/**', but isn't a kernel-doc comment.
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
Thanks.
> ---
> drivers/w1/slaves/w1_ds28e04.c | 15 ++++++++-------
> 1 file changed, 8 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/w1/slaves/w1_ds28e04.c b/drivers/w1/slaves/w1_ds28e04.c
> index 6cef6e2edb89..f54d6afd79c3 100644
> --- a/drivers/w1/slaves/w1_ds28e04.c
> +++ b/drivers/w1/slaves/w1_ds28e04.c
> @@ -53,7 +53,7 @@ struct w1_f1C_data {
> u32 validcrc;
> };
>
> -/**
> +/*
> * Check the file size bounds and adjusts count as needed.
> * This would not be needed if the file size didn't reset to 0 after a write.
> */
> @@ -146,16 +146,17 @@ static ssize_t eeprom_read(struct file *filp, struct kobject *kobj,
> }
>
> /**
> - * Writes to the scratchpad and reads it back for verification.
> + * w1_f1C_write() - Writes to the scratchpad and reads it back for verification.
> + * @sl: The slave structure
> + * @addr: Address for the write
> + * @len: length must be <= (W1_PAGE_SIZE - (addr & W1_PAGE_MASK))
> + * @data: The data to write
> + *
> * Then copies the scratchpad to EEPROM.
> * The data must be on one page.
> * The master must be locked.
> *
> - * @param sl The slave structure
> - * @param addr Address for the write
> - * @param len length must be <= (W1_PAGE_SIZE - (addr & W1_PAGE_MASK))
> - * @param data The data to write
> - * @return 0=Success -1=failure
> + * Return: 0=Success, -1=failure
> */
> static int w1_f1C_write(struct w1_slave *sl, int addr, int len, const u8 *data)
> {
--
~Randy
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 01/15] w1: ds2408: drop kerneldoc annotation
2023-04-15 10:42 [PATCH 01/15] w1: ds2408: drop kerneldoc annotation Krzysztof Kozlowski
` (14 preceding siblings ...)
2023-04-15 10:43 ` [PATCH 15/15] w1: gpio: " Krzysztof Kozlowski
@ 2023-04-15 16:07 ` Randy Dunlap
15 siblings, 0 replies; 23+ messages in thread
From: Randy Dunlap @ 2023-04-15 16:07 UTC (permalink / raw)
To: Krzysztof Kozlowski, linux-kernel
Cc: Evgeniy Polyakov, Greg Kroah-Hartman, Arnd Bergmann,
Olof Johansson, soc, linux-arm-kernel
On 4/15/23 03:42, Krzysztof Kozlowski wrote:
> Drop kerneldoc annotation from comment which is not a kerneldoc to fix:
>
> w1_ds2408.c:210: warning: This comment starts with '/**', but isn't a kernel-doc comment
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
thanks.
> ---
> drivers/w1/slaves/w1_ds2408.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/w1/slaves/w1_ds2408.c b/drivers/w1/slaves/w1_ds2408.c
> index ad102c577122..7fa911989193 100644
> --- a/drivers/w1/slaves/w1_ds2408.c
> +++ b/drivers/w1/slaves/w1_ds2408.c
> @@ -206,7 +206,7 @@ static ssize_t output_write(struct file *filp, struct kobject *kobj,
> }
>
>
> -/**
> +/*
> * Writing to the activity file resets the activity latches.
> */
> static ssize_t activity_write(struct file *filp, struct kobject *kobj,
--
~Randy
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 02/15] w1: ds2433: correct kerneldoc annotation
2023-04-15 10:42 ` [PATCH 02/15] w1: ds2433: correct " Krzysztof Kozlowski
@ 2023-04-15 16:08 ` Randy Dunlap
0 siblings, 0 replies; 23+ messages in thread
From: Randy Dunlap @ 2023-04-15 16:08 UTC (permalink / raw)
To: Krzysztof Kozlowski, linux-kernel
Cc: Evgeniy Polyakov, Greg Kroah-Hartman, Arnd Bergmann,
Olof Johansson, soc, linux-arm-kernel
On 4/15/23 03:42, Krzysztof Kozlowski wrote:
> Correct kerneldoc comments (or drop annotation) to fix:
>
> w1_ds2433.c:46: warning: This comment starts with '/**', but isn't a kernel-doc comment.
> w1_ds2433.c:141: warning: This comment starts with '/**', but isn't a kernel-doc comment.
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
Thanks.
> ---
> drivers/w1/slaves/w1_ds2433.c | 15 ++++++++-------
> 1 file changed, 8 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/w1/slaves/w1_ds2433.c b/drivers/w1/slaves/w1_ds2433.c
> index 0f72df15a024..6134ca2f37fe 100644
> --- a/drivers/w1/slaves/w1_ds2433.c
> +++ b/drivers/w1/slaves/w1_ds2433.c
> @@ -42,7 +42,7 @@ struct w1_f23_data {
> u32 validcrc;
> };
>
> -/**
> +/*
> * Check the file size bounds and adjusts count as needed.
> * This would not be needed if the file size didn't reset to 0 after a write.
> */
> @@ -138,16 +138,17 @@ static ssize_t eeprom_read(struct file *filp, struct kobject *kobj,
> }
>
> /**
> - * Writes to the scratchpad and reads it back for verification.
> + * w1_f23_write() - Writes to the scratchpad and reads it back for verification.
> + * @sl: The slave structure
> + * @addr: Address for the write
> + * @len: length must be <= (W1_PAGE_SIZE - (addr & W1_PAGE_MASK))
> + * @data: The data to write
> + *
> * Then copies the scratchpad to EEPROM.
> * The data must be on one page.
> * The master must be locked.
> *
> - * @param sl The slave structure
> - * @param addr Address for the write
> - * @param len length must be <= (W1_PAGE_SIZE - (addr & W1_PAGE_MASK))
> - * @param data The data to write
> - * @return 0=Success -1=failure
> + * Return: 0=Success, -1=failure
> */
> static int w1_f23_write(struct w1_slave *sl, int addr, int len, const u8 *data)
> {
--
~Randy
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 4/4] w1: omap-hdq: allow compile testing
2023-04-15 15:18 ` Greg Kroah-Hartman
@ 2023-04-16 7:18 ` Krzysztof Kozlowski
0 siblings, 0 replies; 23+ messages in thread
From: Krzysztof Kozlowski @ 2023-04-16 7:18 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: linux-kernel, Evgeniy Polyakov, Arnd Bergmann, Olof Johansson,
soc, linux-arm-kernel
On 15/04/2023 17:18, Greg Kroah-Hartman wrote:
> On Sat, Apr 15, 2023 at 12:42:53PM +0200, Krzysztof Kozlowski wrote:
>> omap-hdq does not depend on anything from ARCH_OMAP for building.
>>
>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>> ---
>> drivers/w1/masters/Kconfig | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/w1/masters/Kconfig b/drivers/w1/masters/Kconfig
>> index 692cac3ff0ee..ad316573288a 100644
>> --- a/drivers/w1/masters/Kconfig
>> +++ b/drivers/w1/masters/Kconfig
>> @@ -53,7 +53,7 @@ config W1_MASTER_GPIO
>>
>> config HDQ_MASTER_OMAP
>> tristate "OMAP HDQ driver"
>> - depends on ARCH_OMAP
>> + depends on ARCH_OMAP || COMPILE_TEST
>> help
>> Say Y here if you want support for the 1-wire or HDQ Interface
>> on an OMAP processor.
>> --
>> 2.34.1
>>
>
> I'm guessing this shouldn't be part of this series?
Yes, a git format-patch glitch. It's included in the series as 12/15.
Best regards,
Krzysztof
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 12/15] w1: omap-hdq: allow compile testing
2023-04-15 16:05 ` Randy Dunlap
@ 2023-04-16 7:22 ` Krzysztof Kozlowski
0 siblings, 0 replies; 23+ messages in thread
From: Krzysztof Kozlowski @ 2023-04-16 7:22 UTC (permalink / raw)
To: Randy Dunlap, linux-kernel
Cc: Evgeniy Polyakov, Greg Kroah-Hartman, Arnd Bergmann,
Olof Johansson, soc, linux-arm-kernel
On 15/04/2023 18:05, Randy Dunlap wrote:
> Hi,
>
> On 4/15/23 03:43, Krzysztof Kozlowski wrote:
>> omap-hdq does not depend on anything from ARCH_OMAP for building.
>>
>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>
> It appears that patches 4 and 12 are the same...
Yes, I messed with git format-patch a bit. #4 can be ignored.
Best regards,
Krzysztof
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 23+ messages in thread
end of thread, other threads:[~2023-04-16 7:23 UTC | newest]
Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-15 10:42 [PATCH 01/15] w1: ds2408: drop kerneldoc annotation Krzysztof Kozlowski
2023-04-15 10:42 ` [PATCH 02/15] w1: ds2433: correct " Krzysztof Kozlowski
2023-04-15 16:08 ` Randy Dunlap
2023-04-15 10:42 ` [PATCH 03/15] w1: ds28e04: " Krzysztof Kozlowski
2023-04-15 16:07 ` Randy Dunlap
2023-04-15 10:42 ` [PATCH 04/15] w1: minor white-space and code style fixes Krzysztof Kozlowski
2023-04-15 10:42 ` [PATCH 4/4] w1: omap-hdq: allow compile testing Krzysztof Kozlowski
2023-04-15 15:18 ` Greg Kroah-Hartman
2023-04-16 7:18 ` Krzysztof Kozlowski
2023-04-15 10:42 ` [PATCH 05/15] w1: use octal for file permissions Krzysztof Kozlowski
2023-04-15 10:42 ` [PATCH 06/15] w1: ds2433: do not use assignment in if condition Krzysztof Kozlowski
2023-04-15 10:42 ` [PATCH 07/15] w1: ds2482: drop unnecessary header Krzysztof Kozlowski
2023-04-15 10:42 ` [PATCH 08/15] w1: ds2482: do not use assignment in if condition Krzysztof Kozlowski
2023-04-15 10:42 ` [PATCH 09/15] w1: matrox: switch from asm to linux header Krzysztof Kozlowski
2023-04-15 10:42 ` [PATCH 10/15] w1: matrox: use inline over __inline__ Krzysztof Kozlowski
2023-04-15 10:43 ` [PATCH 11/15] w1: matrox: remove unnecessary ENOMEM messages Krzysztof Kozlowski
2023-04-15 10:43 ` [PATCH 12/15] w1: omap-hdq: allow compile testing Krzysztof Kozlowski
2023-04-15 16:05 ` Randy Dunlap
2023-04-16 7:22 ` Krzysztof Kozlowski
2023-04-15 10:43 ` [PATCH 13/15] w1: omap-hdq: add SPDX tag Krzysztof Kozlowski
2023-04-15 10:43 ` [PATCH 14/15] w1: omap-hdq: remove unnecessary ENOMEM messages Krzysztof Kozlowski
2023-04-15 10:43 ` [PATCH 15/15] w1: gpio: " Krzysztof Kozlowski
2023-04-15 16:07 ` [PATCH 01/15] w1: ds2408: drop kerneldoc annotation Randy Dunlap
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox