Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1424925 > unrolled thread
| Started by | Rafał Miłecki <zajec5@gmail.com> |
|---|---|
| First post | 2016-06-17 12:50 +0200 |
| Last post | 2016-06-17 13:30 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH] brcmfmac: use const char * for interface name in brcmf_add_if Rafał Miłecki <zajec5@gmail.com> - 2016-06-17 12:50 +0200
Re: [PATCH] brcmfmac: use const char * for interface name in brcmf_add_if Joe Perches <joe@perches.com> - 2016-06-17 13:30 +0200
| From | Rafał Miłecki <zajec5@gmail.com> |
|---|---|
| Date | 2016-06-17 12:50 +0200 |
| Subject | [PATCH] brcmfmac: use const char * for interface name in brcmf_add_if |
| Message-ID | <rKZvz-5q4-7@gated-at.bofh.it> |
This function can work just fine with const pointer, it only calls
alloc_netdev which take const as well. Moreover it makes this function
more flexible as some cfg80211 callback may provide const char * as
well, e.g. add_virtual_intf. This will be needed for more advanced
interface management.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
---
drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c | 2 +-
drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
index 7b38c2b..8d16f02 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
@@ -638,7 +638,7 @@ fail:
}
struct brcmf_if *brcmf_add_if(struct brcmf_pub *drvr, s32 bsscfgidx, s32 ifidx,
- bool is_p2pdev, char *name, u8 *mac_addr)
+ bool is_p2pdev, const char *name, u8 *mac_addr)
{
struct brcmf_if *ifp;
struct net_device *ndev;
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.h
index a0a6f7f..8fa34ca 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.h
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.h
@@ -215,7 +215,7 @@ char *brcmf_ifname(struct brcmf_if *ifp);
struct brcmf_if *brcmf_get_ifp(struct brcmf_pub *drvr, int ifidx);
int brcmf_net_attach(struct brcmf_if *ifp, bool rtnl_locked);
struct brcmf_if *brcmf_add_if(struct brcmf_pub *drvr, s32 bsscfgidx, s32 ifidx,
- bool is_p2pdev, char *name, u8 *mac_addr);
+ bool is_p2pdev, const char *name, u8 *mac_addr);
void brcmf_remove_interface(struct brcmf_if *ifp, bool rtnl_locked);
void brcmf_txflowblock_if(struct brcmf_if *ifp,
enum brcmf_netif_stop_reason reason, bool state);
--
1.8.4.5
[toc] | [next] | [standalone]
| From | Joe Perches <joe@perches.com> |
|---|---|
| Date | 2016-06-17 13:30 +0200 |
| Subject | Re: [PATCH] brcmfmac: use const char * for interface name in brcmf_add_if |
| Message-ID | <rL08i-5Sp-17@gated-at.bofh.it> |
| In reply to | #1424925 |
On Fri, 2016-06-17 at 12:48 +0200, Rafał Miłecki wrote:
> This function can work just fine with const pointer, it only calls
> alloc_netdev which take const as well. Moreover it makes this function
> more flexible as some cfg80211 callback may provide const char * as
> well, e.g. add_virtual_intf. This will be needed for more advanced
> interface management.
[]
> diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
[]
> @@ -638,7 +638,7 @@ fail:
> }
>
> struct brcmf_if *brcmf_add_if(struct brcmf_pub *drvr, s32 bsscfgidx, s32 ifidx,
> - bool is_p2pdev, char *name, u8 *mac_addr)
> + bool is_p2pdev, const char *name, u8 *mac_addr)
Looks like mac_addr should be const too
> {
> struct brcmf_if *ifp;
> struct net_device *ndev;
> diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.h
[]
> @@ -215,7 +215,7 @@ char *brcmf_ifname(struct brcmf_if *ifp);
> struct brcmf_if *brcmf_get_ifp(struct brcmf_pub *drvr, int ifidx);
> int brcmf_net_attach(struct brcmf_if *ifp, bool rtnl_locked);
> struct brcmf_if *brcmf_add_if(struct brcmf_pub *drvr, s32 bsscfgidx, s32 ifidx,
> - bool is_p2pdev, char *name, u8 *mac_addr);
> + bool is_p2pdev, const char *name, u8 *mac_addr);
> void brcmf_remove_interface(struct brcmf_if *ifp, bool rtnl_locked);
> void brcmf_txflowblock_if(struct brcmf_if *ifp,
> enum brcmf_netif_stop_reason reason, bool state);
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web