Message ID | Z06zxM3pREgrOvQA@melbuntu (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | [v2] i2c: omap: Cleaned up coding style and parameters | expand |
Just a minor nit: > Am 03.12.2024 um 08:31 schrieb Dhruv Menon <dhruvmenon1104@gmail.com>: > > Hello Aaro, > > I have updated the patch as requiested, splitting it two parts, > > 1. [PATCH v2 1/2] i2c: omap: Cleaned up coding style > 2. [PATCH v2 2/2] i2c: omap: Removed unsed parameter use "this patch will do" point of view, not "I have done" => Cleaned -> Clean And there is a typo in "unsed". > > I have also removed the changes regarding msleep as the adjustment > was relatively minor. The change was initially considered based > on "Timer's howto" documentation which recommends to change any > msleep(x) < 10ms to usleep_range(x*1000, x*2000) for better > precision. > > Thank you for the time and review. I look forward to your feedback > > Regards > Dhruv Menon >
This patch has been splitted into two parts, 1. [PATCH v2 1/2] i2c: omap: Clean up coding style 2. [PATCH v2 2/2] i2c: omap: Removed unused parameter The patchset also removed the changes regarding msleep as the adjustment was relatively minor which was added earlier. The change was initially considered based on "Timer's howto" documentation which recommends to change any msleep(x) < 10ms to usleep_range(x*1000, x*2000) for better precision. Thank you for the time and review. I look forward to your feedback Regards Dhruv Menon On Tue, Dec 03, 2024 at 09:25:43AM +0100, H. Nikolaus Schaller wrote: > Just a minor nit: > > > Am 03.12.2024 um 08:31 schrieb Dhruv Menon <dhruvmenon1104@gmail.com>: > > > > Hello Aaro, > > > > I have updated the patch as requiested, splitting it two parts, > > > > 1. [PATCH v2 1/2] i2c: omap: Cleaned up coding style > > 2. [PATCH v2 2/2] i2c: omap: Removed unsed parameter > > use "this patch will do" point of view, not "I have done" > > => Cleaned -> Clean > > And there is a typo in "unsed". > > > > > I have also removed the changes regarding msleep as the adjustment > > was relatively minor. The change was initially considered based > > on "Timer's howto" documentation which recommends to change any > > msleep(x) < 10ms to usleep_range(x*1000, x*2000) for better > > precision. > > > > Thank you for the time and review. I look forward to your feedback > > > > Regards > > Dhruv Menon > > >
Am Tue, 3 Dec 2024 15:02:30 +0530 schrieb Dhruv Menon <dhruvmenon1104@gmail.com>: > This patch has been splitted into two parts, > > 1. [PATCH v2 1/2] i2c: omap: Clean up coding style > 2. [PATCH v2 2/2] i2c: omap: Removed unused parameter > > The patchset also removed the changes regarding msleep as the > adjustment was relatively minor which was added earlier. The > change was initially considered based on "Timer's howto" > documentation which recommends to change any msleep(x) < 10ms > to usleep_range(x*1000, x*2000) for better precision. > > Thank you for the time and review. I look forward to your feedback > send the output inline, see Documentation/process/submitting-patches.rst: No MIME, no links, no compression, no attachments. Just plain text Also we want imperative mood in the patches. There is also a lot of automated processing of these patch emails. Regards, Andreas
From 39d6a5d0a065b0302d671eaa215fd952b69b1124 Mon Sep 17 00:00:00 2001 Message-ID: <39d6a5d0a065b0302d671eaa215fd952b69b1124.1733207006.git.dhruvmenon1104@gmail.com> In-Reply-To: <cover.1733207006.git.dhruvmenon1104@gmail.com> References: <cover.1733207006.git.dhruvmenon1104@gmail.com> From: Dhruv Menon <dhruvmenon1104@gmail.com> Date: Tue, 3 Dec 2024 10:47:16 +0530 Subject: [PATCH v2 2/2] i2c: omap: remove unused parameter The parameters `is_rdr` in `omap_i2c_receive_data` and `is_xdr` in `omap_i2c_transmit_data` were unused in the function implementations. This commit removes these parameters. Signed-off-by: Dhruv Menon <dhruvmenon1104@gmail.com> --- drivers/i2c/busses/i2c-omap.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c index df945ddfe089..9838d89df385 100644 --- a/drivers/i2c/busses/i2c-omap.c +++ b/drivers/i2c/busses/i2c-omap.c @@ -990,8 +990,7 @@ static int errata_omap3_i462(struct omap_i2c_dev *omap) return 0; } -static void omap_i2c_receive_data(struct omap_i2c_dev *omap, u8 num_bytes, - bool is_rdr) +static void omap_i2c_receive_data(struct omap_i2c_dev *omap, u8 num_bytes) { u16 w; @@ -1011,8 +1010,7 @@ static void omap_i2c_receive_data(struct omap_i2c_dev *omap, u8 num_bytes, } } -static int omap_i2c_transmit_data(struct omap_i2c_dev *omap, u8 num_bytes, - bool is_xdr) +static int omap_i2c_transmit_data(struct omap_i2c_dev *omap, u8 num_bytes) { u16 w; @@ -1128,7 +1126,7 @@ static int omap_i2c_xfer_data(struct omap_i2c_dev *omap) OMAP_I2C_BUFSTAT_REG) >> 8) & 0x3F; } - omap_i2c_receive_data(omap, num_bytes, true); + omap_i2c_receive_data(omap, num_bytes); omap_i2c_ack_stat(omap, OMAP_I2C_STAT_RDR); continue; } @@ -1139,7 +1137,7 @@ static int omap_i2c_xfer_data(struct omap_i2c_dev *omap) if (omap->threshold) num_bytes = omap->threshold; - omap_i2c_receive_data(omap, num_bytes, false); + omap_i2c_receive_data(omap, num_bytes); omap_i2c_ack_stat(omap, OMAP_I2C_STAT_RRDY); continue; } @@ -1151,7 +1149,7 @@ static int omap_i2c_xfer_data(struct omap_i2c_dev *omap) if (omap->fifo_size) num_bytes = omap->buf_len; - ret = omap_i2c_transmit_data(omap, num_bytes, true); + ret = omap_i2c_transmit_data(omap, num_bytes); if (ret < 0) break; @@ -1166,7 +1164,7 @@ static int omap_i2c_xfer_data(struct omap_i2c_dev *omap) if (omap->threshold) num_bytes = omap->threshold; - ret = omap_i2c_transmit_data(omap, num_bytes, false); + ret = omap_i2c_transmit_data(omap, num_bytes); if (ret < 0) break; -- 2.43.0