* [PATCH 0/3] Replace min with min_t found by checkpatch.pl
@ 2015-03-08 17:06 Darshana Padmadas
2015-03-08 17:06 ` [PATCH 1/3] drivers: staging: dgnc: Replace min with min_t Darshana Padmadas
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Darshana Padmadas @ 2015-03-08 17:06 UTC (permalink / raw)
To: outreachy-kernel; +Cc: Darshana Padmadas
This patch set replaces min with min_t as suggested by checkpatch.pl
Darshana Padmadas (3):
drivers: staging: dgnc: Replace min with min_t
staging: rtl8192e: Replace min with min_t
Staging: rtl8192e: replace min with min_t
drivers/staging/dgnc/dgnc_neo.c | 2 +-
drivers/staging/rtl8192e/rtllib_rx.c | 10 +++++-----
drivers/staging/rtl8192e/rtllib_wx.c | 4 ++--
3 files changed, 8 insertions(+), 8 deletions(-)
--
1.9.1
^ permalink raw reply [flat|nested] 7+ messages in thread* [PATCH 1/3] drivers: staging: dgnc: Replace min with min_t 2015-03-08 17:06 [PATCH 0/3] Replace min with min_t found by checkpatch.pl Darshana Padmadas @ 2015-03-08 17:06 ` Darshana Padmadas 2015-03-08 17:12 ` [Outreachy kernel] " Julia Lawall 2015-03-08 17:06 ` [PATCH 2/3] staging: rtl8192e: " Darshana Padmadas 2015-03-08 17:06 ` [PATCH 3/3] Staging: rtl8192e: replace " Darshana Padmadas 2 siblings, 1 reply; 7+ messages in thread From: Darshana Padmadas @ 2015-03-08 17:06 UTC (permalink / raw) To: outreachy-kernel; +Cc: Darshana Padmadas This patch replaces min with min_t and eliminates the following warning found by checkpatch.pl: WARNING: min() should probably be min_t(uint, n, 12) Signed-off-by: Darshana Padmadas <darshanapadmadas@gmail.com> --- drivers/staging/dgnc/dgnc_neo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/dgnc/dgnc_neo.c b/drivers/staging/dgnc/dgnc_neo.c index c9a8a98..1268aa9 100644 --- a/drivers/staging/dgnc/dgnc_neo.c +++ b/drivers/staging/dgnc/dgnc_neo.c @@ -1203,7 +1203,7 @@ static void neo_copy_data_from_uart_to_queue(struct channel_t *ch) * IBM pSeries platform. * 15 bytes max appears to be the magic number. */ - n = min((uint) n, (uint) 12); + n = min_t(uint, n, 12); /* * Since we are grabbing the linestatus register, which -- 1.9.1 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [Outreachy kernel] [PATCH 1/3] drivers: staging: dgnc: Replace min with min_t 2015-03-08 17:06 ` [PATCH 1/3] drivers: staging: dgnc: Replace min with min_t Darshana Padmadas @ 2015-03-08 17:12 ` Julia Lawall 0 siblings, 0 replies; 7+ messages in thread From: Julia Lawall @ 2015-03-08 17:12 UTC (permalink / raw) To: Darshana Padmadas; +Cc: outreachy-kernel You don't need drivers: in the subject line. You can see the typical subject line for this file by doing: git log --oneline drivers/staging/dgnc/dgnc_neo.c julia On Sun, 8 Mar 2015, Darshana Padmadas wrote: > This patch replaces min with min_t and eliminates > the following warning found by checkpatch.pl: > > WARNING: min() should probably be min_t(uint, n, 12) > > Signed-off-by: Darshana Padmadas <darshanapadmadas@gmail.com> > --- > drivers/staging/dgnc/dgnc_neo.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/dgnc/dgnc_neo.c b/drivers/staging/dgnc/dgnc_neo.c > index c9a8a98..1268aa9 100644 > --- a/drivers/staging/dgnc/dgnc_neo.c > +++ b/drivers/staging/dgnc/dgnc_neo.c > @@ -1203,7 +1203,7 @@ static void neo_copy_data_from_uart_to_queue(struct channel_t *ch) > * IBM pSeries platform. > * 15 bytes max appears to be the magic number. > */ > - n = min((uint) n, (uint) 12); > + n = min_t(uint, n, 12); > > /* > * Since we are grabbing the linestatus register, which > -- > 1.9.1 > > -- > You received this message because you are subscribed to the Google Groups "outreachy-kernel" group. > To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com. > To post to this group, send email to outreachy-kernel@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/d4b06a098716afe3413fc50634a05e17a1038718.1425833758.git.darshanapadmadas%40gmail.com. > For more options, visit https://groups.google.com/d/optout. > ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 2/3] staging: rtl8192e: Replace min with min_t 2015-03-08 17:06 [PATCH 0/3] Replace min with min_t found by checkpatch.pl Darshana Padmadas 2015-03-08 17:06 ` [PATCH 1/3] drivers: staging: dgnc: Replace min with min_t Darshana Padmadas @ 2015-03-08 17:06 ` Darshana Padmadas 2015-03-08 17:10 ` [Outreachy kernel] " Julia Lawall 2015-03-08 17:06 ` [PATCH 3/3] Staging: rtl8192e: replace " Darshana Padmadas 2 siblings, 1 reply; 7+ messages in thread From: Darshana Padmadas @ 2015-03-08 17:06 UTC (permalink / raw) To: outreachy-kernel; +Cc: Darshana Padmadas This patch replaces min with min_t and eliminates the following warnings found by checkpatch.pl: WARNING: min() should probably be min_t(u8, info_element->len, MAX_IE_LEN) WARNING: min() should probably be min_t(u8, info_element->len, MAX_IE_LEN) WARNING: min() should probably be min_t(u8, info_element->len, MAX_IE_LEN) WARNING: min() should probably be min_t(u8, info_element->len, MAX_IE_LEN) WARNING: min() should probably be min_t(u8, info_element->len, MAX_IE_LEN) Signed-off-by: Darshana Padmadas <darshanapadmadas@gmail.com> --- drivers/staging/rtl8192e/rtllib_rx.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c index 1664040..0386568 100644 --- a/drivers/staging/rtl8192e/rtllib_rx.c +++ b/drivers/staging/rtl8192e/rtllib_rx.c @@ -1908,7 +1908,7 @@ int rtllib_parse_info_param(struct rtllib_device *ieee, info_element->data[2] == 0x4c && info_element->data[3] == 0x033) { - tmp_htcap_len = min(info_element->len, (u8)MAX_IE_LEN); + tmp_htcap_len = min_t(u8, info_element->len, MAX_IE_LEN); if (tmp_htcap_len != 0) { network->bssht.bdHTSpecVer = HT_SPEC_VER_EWC; network->bssht.bdHTCapLen = tmp_htcap_len > sizeof(network->bssht.bdHTCapBuf) ? @@ -1932,7 +1932,7 @@ int rtllib_parse_info_param(struct rtllib_device *ieee, info_element->data[1] == 0x90 && info_element->data[2] == 0x4c && info_element->data[3] == 0x034) { - tmp_htinfo_len = min(info_element->len, (u8)MAX_IE_LEN); + tmp_htinfo_len = min_t(u8, info_element->len, MAX_IE_LEN); if (tmp_htinfo_len != 0) { network->bssht.bdHTSpecVer = HT_SPEC_VER_EWC; if (tmp_htinfo_len) { @@ -1953,7 +1953,7 @@ int rtllib_parse_info_param(struct rtllib_device *ieee, info_element->data[1] == 0xe0 && info_element->data[2] == 0x4c && info_element->data[3] == 0x02) { - ht_realtek_agg_len = min(info_element->len, (u8)MAX_IE_LEN); + ht_realtek_agg_len = min_t(u8, info_element->len, MAX_IE_LEN); memcpy(ht_realtek_agg_buf, info_element->data, info_element->len); } if (ht_realtek_agg_len >= 5) { @@ -2083,7 +2083,7 @@ int rtllib_parse_info_param(struct rtllib_device *ieee, case MFIE_TYPE_HT_CAP: RTLLIB_DEBUG_SCAN("MFIE_TYPE_HT_CAP: %d bytes\n", info_element->len); - tmp_htcap_len = min(info_element->len, (u8)MAX_IE_LEN); + tmp_htcap_len = min_t(u8, info_element->len, MAX_IE_LEN); if (tmp_htcap_len != 0) { network->bssht.bdHTSpecVer = HT_SPEC_VER_EWC; network->bssht.bdHTCapLen = tmp_htcap_len > sizeof(network->bssht.bdHTCapBuf) ? @@ -2110,7 +2110,7 @@ int rtllib_parse_info_param(struct rtllib_device *ieee, case MFIE_TYPE_HT_INFO: RTLLIB_DEBUG_SCAN("MFIE_TYPE_HT_INFO: %d bytes\n", info_element->len); - tmp_htinfo_len = min(info_element->len, (u8)MAX_IE_LEN); + tmp_htinfo_len = min_t(u8, info_element->len, MAX_IE_LEN); if (tmp_htinfo_len) { network->bssht.bdHTSpecVer = HT_SPEC_VER_IEEE; network->bssht.bdHTInfoLen = tmp_htinfo_len > -- 1.9.1 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [Outreachy kernel] [PATCH 2/3] staging: rtl8192e: Replace min with min_t 2015-03-08 17:06 ` [PATCH 2/3] staging: rtl8192e: " Darshana Padmadas @ 2015-03-08 17:10 ` Julia Lawall 0 siblings, 0 replies; 7+ messages in thread From: Julia Lawall @ 2015-03-08 17:10 UTC (permalink / raw) To: Darshana Padmadas; +Cc: outreachy-kernel On Sun, 8 Mar 2015, Darshana Padmadas wrote: > This patch replaces min with min_t and eliminates the > following warnings found by checkpatch.pl: > > WARNING: min() should probably be min_t(u8, info_element->len, MAX_IE_LEN) > WARNING: min() should probably be min_t(u8, info_element->len, MAX_IE_LEN) > WARNING: min() should probably be min_t(u8, info_element->len, MAX_IE_LEN) > WARNING: min() should probably be min_t(u8, info_element->len, MAX_IE_LEN) > WARNING: min() should probably be min_t(u8, info_element->len, MAX_IE_LEN) You don't need to show all the instances of the message, at least if they are all the same. julia > > Signed-off-by: Darshana Padmadas <darshanapadmadas@gmail.com> > --- > drivers/staging/rtl8192e/rtllib_rx.c | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c > index 1664040..0386568 100644 > --- a/drivers/staging/rtl8192e/rtllib_rx.c > +++ b/drivers/staging/rtl8192e/rtllib_rx.c > @@ -1908,7 +1908,7 @@ int rtllib_parse_info_param(struct rtllib_device *ieee, > info_element->data[2] == 0x4c && > info_element->data[3] == 0x033) { > > - tmp_htcap_len = min(info_element->len, (u8)MAX_IE_LEN); > + tmp_htcap_len = min_t(u8, info_element->len, MAX_IE_LEN); > if (tmp_htcap_len != 0) { > network->bssht.bdHTSpecVer = HT_SPEC_VER_EWC; > network->bssht.bdHTCapLen = tmp_htcap_len > sizeof(network->bssht.bdHTCapBuf) ? > @@ -1932,7 +1932,7 @@ int rtllib_parse_info_param(struct rtllib_device *ieee, > info_element->data[1] == 0x90 && > info_element->data[2] == 0x4c && > info_element->data[3] == 0x034) { > - tmp_htinfo_len = min(info_element->len, (u8)MAX_IE_LEN); > + tmp_htinfo_len = min_t(u8, info_element->len, MAX_IE_LEN); > if (tmp_htinfo_len != 0) { > network->bssht.bdHTSpecVer = HT_SPEC_VER_EWC; > if (tmp_htinfo_len) { > @@ -1953,7 +1953,7 @@ int rtllib_parse_info_param(struct rtllib_device *ieee, > info_element->data[1] == 0xe0 && > info_element->data[2] == 0x4c && > info_element->data[3] == 0x02) { > - ht_realtek_agg_len = min(info_element->len, (u8)MAX_IE_LEN); > + ht_realtek_agg_len = min_t(u8, info_element->len, MAX_IE_LEN); > memcpy(ht_realtek_agg_buf, info_element->data, info_element->len); > } > if (ht_realtek_agg_len >= 5) { > @@ -2083,7 +2083,7 @@ int rtllib_parse_info_param(struct rtllib_device *ieee, > case MFIE_TYPE_HT_CAP: > RTLLIB_DEBUG_SCAN("MFIE_TYPE_HT_CAP: %d bytes\n", > info_element->len); > - tmp_htcap_len = min(info_element->len, (u8)MAX_IE_LEN); > + tmp_htcap_len = min_t(u8, info_element->len, MAX_IE_LEN); > if (tmp_htcap_len != 0) { > network->bssht.bdHTSpecVer = HT_SPEC_VER_EWC; > network->bssht.bdHTCapLen = tmp_htcap_len > sizeof(network->bssht.bdHTCapBuf) ? > @@ -2110,7 +2110,7 @@ int rtllib_parse_info_param(struct rtllib_device *ieee, > case MFIE_TYPE_HT_INFO: > RTLLIB_DEBUG_SCAN("MFIE_TYPE_HT_INFO: %d bytes\n", > info_element->len); > - tmp_htinfo_len = min(info_element->len, (u8)MAX_IE_LEN); > + tmp_htinfo_len = min_t(u8, info_element->len, MAX_IE_LEN); > if (tmp_htinfo_len) { > network->bssht.bdHTSpecVer = HT_SPEC_VER_IEEE; > network->bssht.bdHTInfoLen = tmp_htinfo_len > > -- > 1.9.1 > > -- > You received this message because you are subscribed to the Google Groups "outreachy-kernel" group. > To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com. > To post to this group, send email to outreachy-kernel@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/4e1526d0654a77e3df0f924f3bad671243a11ba9.1425833758.git.darshanapadmadas%40gmail.com. > For more options, visit https://groups.google.com/d/optout. > ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 3/3] Staging: rtl8192e: replace min with min_t 2015-03-08 17:06 [PATCH 0/3] Replace min with min_t found by checkpatch.pl Darshana Padmadas 2015-03-08 17:06 ` [PATCH 1/3] drivers: staging: dgnc: Replace min with min_t Darshana Padmadas 2015-03-08 17:06 ` [PATCH 2/3] staging: rtl8192e: " Darshana Padmadas @ 2015-03-08 17:06 ` Darshana Padmadas 2015-03-08 17:14 ` [Outreachy kernel] " Julia Lawall 2 siblings, 1 reply; 7+ messages in thread From: Darshana Padmadas @ 2015-03-08 17:06 UTC (permalink / raw) To: outreachy-kernel; +Cc: Darshana Padmadas This patch replaces min with min_t and eliminates the following warnings found by checkpatch.pl: WARNING: min() should probably be min_t(u8, network->ssid_len, 32) WARNING: min() should probably be min_t(u8, network->hidden_ssid_len, 32) Signed-off-by: Darshana Padmadas <darshanapadmadas@gmail.com> --- drivers/staging/rtl8192e/rtllib_wx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8192e/rtllib_wx.c b/drivers/staging/rtl8192e/rtllib_wx.c index 309cda0..2e665ed 100644 --- a/drivers/staging/rtl8192e/rtllib_wx.c +++ b/drivers/staging/rtl8192e/rtllib_wx.c @@ -74,7 +74,7 @@ static inline char *rtl819x_translate_scan(struct rtllib_device *ieee, iwe.cmd = SIOCGIWESSID; iwe.u.data.flags = 1; if (network->ssid_len > 0) { - iwe.u.data.length = min(network->ssid_len, (u8)32); + iwe.u.data.length = min_t(u8, network->ssid_len, 32); start = iwe_stream_add_point_rsl(info, start, stop, &iwe, network->ssid); } else if (network->hidden_ssid_len == 0) { @@ -82,7 +82,7 @@ static inline char *rtl819x_translate_scan(struct rtllib_device *ieee, start = iwe_stream_add_point_rsl(info, start, stop, &iwe, "<hidden>"); } else { - iwe.u.data.length = min(network->hidden_ssid_len, (u8)32); + iwe.u.data.length = min_t(u8, network->hidden_ssid_len, 32); start = iwe_stream_add_point_rsl(info, start, stop, &iwe, network->hidden_ssid); } -- 1.9.1 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [Outreachy kernel] [PATCH 3/3] Staging: rtl8192e: replace min with min_t 2015-03-08 17:06 ` [PATCH 3/3] Staging: rtl8192e: replace " Darshana Padmadas @ 2015-03-08 17:14 ` Julia Lawall 0 siblings, 0 replies; 7+ messages in thread From: Julia Lawall @ 2015-03-08 17:14 UTC (permalink / raw) To: Darshana Padmadas; +Cc: outreachy-kernel This satisfies the requirement of having a unique subject for each patch by changing the capitalization of staging. I guess that works here, but it doesn't really scale up. You could just put the two patches together. julia On Sun, 8 Mar 2015, Darshana Padmadas wrote: > This patch replaces min with min_t and eliminates > the following warnings found by checkpatch.pl: > > WARNING: min() should probably be min_t(u8, network->ssid_len, 32) > WARNING: min() should probably be min_t(u8, network->hidden_ssid_len, 32) > > Signed-off-by: Darshana Padmadas <darshanapadmadas@gmail.com> > --- > drivers/staging/rtl8192e/rtllib_wx.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/staging/rtl8192e/rtllib_wx.c b/drivers/staging/rtl8192e/rtllib_wx.c > index 309cda0..2e665ed 100644 > --- a/drivers/staging/rtl8192e/rtllib_wx.c > +++ b/drivers/staging/rtl8192e/rtllib_wx.c > @@ -74,7 +74,7 @@ static inline char *rtl819x_translate_scan(struct rtllib_device *ieee, > iwe.cmd = SIOCGIWESSID; > iwe.u.data.flags = 1; > if (network->ssid_len > 0) { > - iwe.u.data.length = min(network->ssid_len, (u8)32); > + iwe.u.data.length = min_t(u8, network->ssid_len, 32); > start = iwe_stream_add_point_rsl(info, start, stop, &iwe, > network->ssid); > } else if (network->hidden_ssid_len == 0) { > @@ -82,7 +82,7 @@ static inline char *rtl819x_translate_scan(struct rtllib_device *ieee, > start = iwe_stream_add_point_rsl(info, start, stop, > &iwe, "<hidden>"); > } else { > - iwe.u.data.length = min(network->hidden_ssid_len, (u8)32); > + iwe.u.data.length = min_t(u8, network->hidden_ssid_len, 32); > start = iwe_stream_add_point_rsl(info, start, stop, &iwe, > network->hidden_ssid); > } > -- > 1.9.1 > > -- > You received this message because you are subscribed to the Google Groups "outreachy-kernel" group. > To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com. > To post to this group, send email to outreachy-kernel@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/8af55228b8d4679edc59c0ffda4d8aabc9455b7e.1425833758.git.darshanapadmadas%40gmail.com. > For more options, visit https://groups.google.com/d/optout. > ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-03-08 17:14 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-03-08 17:06 [PATCH 0/3] Replace min with min_t found by checkpatch.pl Darshana Padmadas 2015-03-08 17:06 ` [PATCH 1/3] drivers: staging: dgnc: Replace min with min_t Darshana Padmadas 2015-03-08 17:12 ` [Outreachy kernel] " Julia Lawall 2015-03-08 17:06 ` [PATCH 2/3] staging: rtl8192e: " Darshana Padmadas 2015-03-08 17:10 ` [Outreachy kernel] " Julia Lawall 2015-03-08 17:06 ` [PATCH 3/3] Staging: rtl8192e: replace " Darshana Padmadas 2015-03-08 17:14 ` [Outreachy kernel] " Julia Lawall
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.