From: Geert Uytterhoeven <geert+renesas@glider.be> To: Jonathan Corbet <corbet@lwn.net>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Ludovic Desroches <ludovic.desroches@microchip.com>, Ulf Hansson <ulf.hansson@linaro.org>, Nicolas Ferre <nicolas.ferre@microchip.com>, Alexandre Belloni <alexandre.belloni@bootlin.com>, Jaehoon Chung <jh80.chung@samsung.com>, "David S . Miller" <davem@davemloft.net>, "Rafael J . Wysocki" <rafael@kernel.org>, Johannes Berg <johannes@sipsolutions.net> Cc: linux-doc@vger.kernel.org, linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven <geert+renesas@glider.be> Subject: [PATCH v2 2/7] mac80211: Use debugfs_create_xul() helper Date: Fri, 25 Oct 2019 11:41:25 +0200 [thread overview] Message-ID: <20191025094130.26033-3-geert+renesas@glider.be> (raw) In-Reply-To: <20191025094130.26033-1-geert+renesas@glider.be> Use the new debugfs_create_xul() helper instead of open-coding the same operation. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> --- v2: - No changes. --- net/mac80211/debugfs_sta.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/net/mac80211/debugfs_sta.c b/net/mac80211/debugfs_sta.c index c8ad20c28c438dab..ca34dcdac8c0bd4d 100644 --- a/net/mac80211/debugfs_sta.c +++ b/net/mac80211/debugfs_sta.c @@ -928,12 +928,7 @@ STA_OPS(he_capa); sta->debugfs_dir, sta, &sta_ ##name## _ops); #define DEBUGFS_ADD_COUNTER(name, field) \ - if (sizeof(sta->field) == sizeof(u32)) \ - debugfs_create_u32(#name, 0400, sta->debugfs_dir, \ - (u32 *) &sta->field); \ - else \ - debugfs_create_u64(#name, 0400, sta->debugfs_dir, \ - (u64 *) &sta->field); + debugfs_create_ulong(#name, 0400, sta->debugfs_dir, &sta->field); void ieee80211_sta_debugfs_add(struct sta_info *sta) { @@ -978,14 +973,8 @@ void ieee80211_sta_debugfs_add(struct sta_info *sta) NL80211_EXT_FEATURE_AIRTIME_FAIRNESS)) DEBUGFS_ADD(airtime); - if (sizeof(sta->driver_buffered_tids) == sizeof(u32)) - debugfs_create_x32("driver_buffered_tids", 0400, - sta->debugfs_dir, - (u32 *)&sta->driver_buffered_tids); - else - debugfs_create_x64("driver_buffered_tids", 0400, - sta->debugfs_dir, - (u64 *)&sta->driver_buffered_tids); + debugfs_create_xul("driver_buffered_tids", 0400, sta->debugfs_dir, + &sta->driver_buffered_tids); drv_sta_add_debugfs(local, sdata, &sta->sta, sta->debugfs_dir); } -- 2.17.1
WARNING: multiple messages have this Message-ID (diff)
From: Geert Uytterhoeven <geert+renesas@glider.be> To: Jonathan Corbet <corbet@lwn.net>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Ludovic Desroches <ludovic.desroches@microchip.com>, Ulf Hansson <ulf.hansson@linaro.org>, Nicolas Ferre <nicolas.ferre@microchip.com>, Alexandre Belloni <alexandre.belloni@bootlin.com>, Jaehoon Chung <jh80.chung@samsung.com>, "David S . Miller" <davem@davemloft.net>, "Rafael J . Wysocki" <rafael@kernel.org>, Johannes Berg <johannes@sipsolutions.net> Cc: Geert Uytterhoeven <geert+renesas@glider.be>, linux-doc@vger.kernel.org, netdev@vger.kernel.org, linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 2/7] mac80211: Use debugfs_create_xul() helper Date: Fri, 25 Oct 2019 11:41:25 +0200 [thread overview] Message-ID: <20191025094130.26033-3-geert+renesas@glider.be> (raw) In-Reply-To: <20191025094130.26033-1-geert+renesas@glider.be> Use the new debugfs_create_xul() helper instead of open-coding the same operation. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> --- v2: - No changes. --- net/mac80211/debugfs_sta.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/net/mac80211/debugfs_sta.c b/net/mac80211/debugfs_sta.c index c8ad20c28c438dab..ca34dcdac8c0bd4d 100644 --- a/net/mac80211/debugfs_sta.c +++ b/net/mac80211/debugfs_sta.c @@ -928,12 +928,7 @@ STA_OPS(he_capa); sta->debugfs_dir, sta, &sta_ ##name## _ops); #define DEBUGFS_ADD_COUNTER(name, field) \ - if (sizeof(sta->field) == sizeof(u32)) \ - debugfs_create_u32(#name, 0400, sta->debugfs_dir, \ - (u32 *) &sta->field); \ - else \ - debugfs_create_u64(#name, 0400, sta->debugfs_dir, \ - (u64 *) &sta->field); + debugfs_create_ulong(#name, 0400, sta->debugfs_dir, &sta->field); void ieee80211_sta_debugfs_add(struct sta_info *sta) { @@ -978,14 +973,8 @@ void ieee80211_sta_debugfs_add(struct sta_info *sta) NL80211_EXT_FEATURE_AIRTIME_FAIRNESS)) DEBUGFS_ADD(airtime); - if (sizeof(sta->driver_buffered_tids) == sizeof(u32)) - debugfs_create_x32("driver_buffered_tids", 0400, - sta->debugfs_dir, - (u32 *)&sta->driver_buffered_tids); - else - debugfs_create_x64("driver_buffered_tids", 0400, - sta->debugfs_dir, - (u64 *)&sta->driver_buffered_tids); + debugfs_create_xul("driver_buffered_tids", 0400, sta->debugfs_dir, + &sta->driver_buffered_tids); drv_sta_add_debugfs(local, sdata, &sta->sta, sta->debugfs_dir); } -- 2.17.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2019-10-25 11:09 UTC|newest] Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-10-25 9:41 [PATCH v2 0/7] debugfs: Add and use debugfs_create_xul() Geert Uytterhoeven 2019-10-25 9:41 ` Geert Uytterhoeven 2019-10-25 9:41 ` Geert Uytterhoeven 2019-10-25 9:41 ` [PATCH v2 1/7] debugfs: Add debugfs_create_xul() for hexadecimal unsigned long Geert Uytterhoeven 2019-10-25 9:41 ` Geert Uytterhoeven 2019-10-25 9:41 ` Geert Uytterhoeven [this message] 2019-10-25 9:41 ` [PATCH v2 2/7] mac80211: Use debugfs_create_xul() helper Geert Uytterhoeven 2019-11-04 7:28 ` Johannes Berg 2019-11-04 7:28 ` Johannes Berg 2019-11-04 7:39 ` Greg Kroah-Hartman 2019-11-04 7:39 ` Greg Kroah-Hartman 2019-10-25 9:41 ` [PATCH v2 3/7] net: caif: Fix debugfs on 64-bit platforms Geert Uytterhoeven 2019-10-25 9:41 ` Geert Uytterhoeven 2019-10-25 9:41 ` [PATCH v2 4/7] mmc: atmel-mci: " Geert Uytterhoeven 2019-10-25 9:41 ` Geert Uytterhoeven 2019-10-25 9:41 ` [PATCH v2 5/7] mmc: atmel-mci: Remove superfluous cast in debugfs_create_u32() call Geert Uytterhoeven 2019-10-25 9:41 ` Geert Uytterhoeven 2019-10-25 9:41 ` Geert Uytterhoeven 2019-10-25 9:41 ` [PATCH v2 6/7] mmc: dw_mmc: Fix debugfs on 64-bit platforms Geert Uytterhoeven 2019-10-25 9:41 ` Geert Uytterhoeven 2019-10-25 9:41 ` Geert Uytterhoeven 2019-10-25 9:41 ` [PATCH v2 7/7] mmc: dw_mmc: Remove superfluous cast in debugfs_create_u32() call Geert Uytterhoeven 2019-10-25 9:41 ` Geert Uytterhoeven 2019-10-25 9:41 ` Geert Uytterhoeven 2019-11-03 17:13 ` [PATCH v2 0/7] debugfs: Add and use debugfs_create_xul() Greg Kroah-Hartman 2019-11-03 17:13 ` Greg Kroah-Hartman
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=20191025094130.26033-3-geert+renesas@glider.be \ --to=geert+renesas@glider.be \ --cc=alexandre.belloni@bootlin.com \ --cc=corbet@lwn.net \ --cc=davem@davemloft.net \ --cc=gregkh@linuxfoundation.org \ --cc=jh80.chung@samsung.com \ --cc=johannes@sipsolutions.net \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-doc@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-mmc@vger.kernel.org \ --cc=linux-wireless@vger.kernel.org \ --cc=ludovic.desroches@microchip.com \ --cc=netdev@vger.kernel.org \ --cc=nicolas.ferre@microchip.com \ --cc=rafael@kernel.org \ --cc=ulf.hansson@linaro.org \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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.