From: YueHaibing <[email protected]>
Fix sparse warning:
drivers/ntb/hw/intel/ntb_hw_gen3.c:535:5: warning:
symbol 'intel_ntb3_peer_db_addr' was not declared. Should it be static?
Signed-off-by: YueHaibing <[email protected]>
---
drivers/ntb/hw/intel/ntb_hw_gen3.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/ntb/hw/intel/ntb_hw_gen3.c b/drivers/ntb/hw/intel/ntb_hw_gen3.c
index f475b56..c339716 100644
--- a/drivers/ntb/hw/intel/ntb_hw_gen3.c
+++ b/drivers/ntb/hw/intel/ntb_hw_gen3.c
@@ -532,9 +532,9 @@ static int intel_ntb3_mw_set_trans(struct ntb_dev *ntb, int pidx, int idx,
return 0;
}
-int intel_ntb3_peer_db_addr(struct ntb_dev *ntb, phys_addr_t *db_addr,
- resource_size_t *db_size,
- u64 *db_data, int db_bit)
+static int intel_ntb3_peer_db_addr(struct ntb_dev *ntb, phys_addr_t *db_addr,
+ resource_size_t *db_size,
+ u64 *db_data, int db_bit)
{
phys_addr_t db_addr_base;
struct intel_ntb_dev *ndev = ntb_ndev(ntb);
--
2.7.0
On Wed, Mar 20, 2019 at 10:08:12PM +0800, Yue Haibing wrote:
> From: YueHaibing <[email protected]>
>
> Fix sparse warning:
>
> drivers/ntb/hw/intel/ntb_hw_gen3.c:535:5: warning:
> symbol 'intel_ntb3_peer_db_addr' was not declared. Should it be static?
>
> Signed-off-by: YueHaibing <[email protected]>
Looks good to me. Added to the ntb branch,
Thanks,
Jon
> ---
> drivers/ntb/hw/intel/ntb_hw_gen3.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/ntb/hw/intel/ntb_hw_gen3.c b/drivers/ntb/hw/intel/ntb_hw_gen3.c
> index f475b56..c339716 100644
> --- a/drivers/ntb/hw/intel/ntb_hw_gen3.c
> +++ b/drivers/ntb/hw/intel/ntb_hw_gen3.c
> @@ -532,9 +532,9 @@ static int intel_ntb3_mw_set_trans(struct ntb_dev *ntb, int pidx, int idx,
> return 0;
> }
>
> -int intel_ntb3_peer_db_addr(struct ntb_dev *ntb, phys_addr_t *db_addr,
> - resource_size_t *db_size,
> - u64 *db_data, int db_bit)
> +static int intel_ntb3_peer_db_addr(struct ntb_dev *ntb, phys_addr_t *db_addr,
> + resource_size_t *db_size,
> + u64 *db_data, int db_bit)
> {
> phys_addr_t db_addr_base;
> struct intel_ntb_dev *ndev = ntb_ndev(ntb);
> --
> 2.7.0
>
>
> -----Original Message-----
> From: Yue Haibing [mailto:[email protected]]
> Sent: Wednesday, March 20, 2019 7:08 AM
> To: Jiang, Dave <[email protected]>; [email protected];
> [email protected]
> Cc: [email protected]; [email protected]; YueHaibing
> <[email protected]>
> Subject: [PATCH -next] ntb: intel: Make intel_ntb3_peer_db_addr static
>
> From: YueHaibing <[email protected]>
>
> Fix sparse warning:
>
> drivers/ntb/hw/intel/ntb_hw_gen3.c:535:5: warning:
> symbol 'intel_ntb3_peer_db_addr' was not declared. Should it be static?
For now yes. Thanks!
Acked-by: Dave Jiang <[email protected]>
>
> Signed-off-by: YueHaibing <[email protected]>
> ---
> drivers/ntb/hw/intel/ntb_hw_gen3.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/ntb/hw/intel/ntb_hw_gen3.c
> b/drivers/ntb/hw/intel/ntb_hw_gen3.c
> index f475b56..c339716 100644
> --- a/drivers/ntb/hw/intel/ntb_hw_gen3.c
> +++ b/drivers/ntb/hw/intel/ntb_hw_gen3.c
> @@ -532,9 +532,9 @@ static int intel_ntb3_mw_set_trans(struct ntb_dev
> *ntb, int pidx, int idx,
> return 0;
> }
>
> -int intel_ntb3_peer_db_addr(struct ntb_dev *ntb, phys_addr_t *db_addr,
> - resource_size_t *db_size,
> - u64 *db_data, int db_bit)
> +static int intel_ntb3_peer_db_addr(struct ntb_dev *ntb, phys_addr_t
> *db_addr,
> + resource_size_t *db_size,
> + u64 *db_data, int db_bit)
> {
> phys_addr_t db_addr_base;
> struct intel_ntb_dev *ndev = ntb_ndev(ntb);
> --
> 2.7.0
>