diff mbox series

[v2,3/3] swiotlb: Mark max_segment with static keyword

Message ID 20200902173105.38293-3-andriy.shevchenko@linux.intel.com
State New
Headers show
Series [v2,1/3] swiotlb: Use %pa to print phys_addr_t variables | expand

Commit Message

Andy Shevchenko Sept. 2, 2020, 5:31 p.m. UTC
Sparse is not happy about max_segment declaration:

  CHECK   kernel/dma/swiotlb.c
  kernel/dma/swiotlb.c:96:14: warning: symbol 'max_segment' was not declared. Should it be static?

Mark it static as suggested.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
v2: no change
 kernel/dma/swiotlb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series


diff --git a/kernel/dma/swiotlb.c b/kernel/dma/swiotlb.c
index 6499bda8f0b8..465a567678d9 100644
--- a/kernel/dma/swiotlb.c
+++ b/kernel/dma/swiotlb.c
@@ -93,7 +93,7 @@  static unsigned int io_tlb_index;
  * Max segment that we can provide which (if pages are contingous) will
  * not be bounced (unless SWIOTLB_FORCE is set).
-unsigned int max_segment;
+static unsigned int max_segment;
  * We need to save away the original address corresponding to a mapped entry