From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760677AbdEXIQe (ORCPT ); Wed, 24 May 2017 04:16:34 -0400 Received: from mail-pg0-f65.google.com ([74.125.83.65]:34438 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757791AbdEXIQV (ORCPT ); Wed, 24 May 2017 04:16:21 -0400 Date: Wed, 24 May 2017 17:16:18 +0900 From: Sergey Senozhatsky To: Nick Desaulniers Cc: md@google.com, mka@chromium.org, Minchan Kim , Nitin Gupta , Sergey Senozhatsky , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm/zsmalloc: fix -Wunneeded-internal-declaration warning Message-ID: <20170524081617.GA3311@jagdpanzerIV.localdomain> References: <20170524053859.29059-1-nick.desaulniers@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170524053859.29059-1-nick.desaulniers@gmail.com> User-Agent: Mutt/1.8.2 (2017-04-18) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On (05/23/17 22:38), Nick Desaulniers wrote: > > is_first_page() is only called from the macro VM_BUG_ON_PAGE() which is > only compiled in as a runtime check when CONFIG_DEBUG_VM is set, > otherwise is checked at compile time and not actually compiled in. > > Fixes the following warning, found with Clang: > > mm/zsmalloc.c:472:12: warning: function 'is_first_page' is not needed and > will not be emitted [-Wunneeded-internal-declaration] > static int is_first_page(struct page *page) > ^ > > Signed-off-by: Nick Desaulniers well, no objections from my side. MM seems to be getting more and more `__maybe_unused' annotations because of clang. Reviewed-by: Sergey Senozhatsky -ss