Received: by 10.223.185.116 with SMTP id b49csp1089601wrg; Fri, 23 Feb 2018 11:44:56 -0800 (PST) X-Google-Smtp-Source: AH8x227IMri49O0wm7NZXB1CdVfWSFj8qGVsl9khV5rwmdwODeUYzQhXT+cZKVtGZxVF13u3h10b X-Received: by 10.98.60.15 with SMTP id j15mr2816740pfa.7.1519415096827; Fri, 23 Feb 2018 11:44:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519415096; cv=none; d=google.com; s=arc-20160816; b=KLdx3I89dsKJP3EVOaUMcEGprVhYCIN3EN7da01agsaQ0D4SGEO45LpfhxxAkW0B44 yuwTSScl9S4ukLODomCxaTOj71pyASpWGolmW2D77A4yzlW8bNesaO2h8kdL73jFbxZ3 gmoqj6Em/6vD6eRu5NYQqpzFu3tkYlaxKaC1tcu2+oRBlFbfW3sSTQv7x24sIzileiMg D3tlPXQiW/IRjuRmmigWrYIefUxDJIMSwEV08IRtb5zlPw//5VyKPC2eF1sR2gl+3Uzx YXI8B5MR7T+FVn0d4TCDdMPaiNZxbu+8s9ka/mxpI9V7Dvk8uxlgQ20rboSs8KswqCg8 zVpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=R/FfRPFqamtUOYaVfKMkwljKsa0EXhQYXRcporGt6Ww=; b=N68GSYwVPNjUqPKXWRNRAh165kd3Uvd5JkGYGkbuvqNNlX088STPHseHZENdeC67en QO4Ns0OGAAJ4YPFEgwyfYfCdDM3qmCEMTAJJjeDyONXef9SZ9YrMPM2y85EhpQmWPqk8 SQShb6clfaSCX9lLSgPfBtOkk/e90+vFhmFXmaA/O5wnxFMOSaNLTCxaFOyYT5undxjm xNDH1h+Dd3F6Ge66fFx8L2y6gqgkfy1aibF6BM7QTSVRUbVpdb3HjZWGbl+vWGHSMtRq CWz8cNfk/SQScuGGNEym//LX4FV849FzXsb19WcJ/GcCCFwnzRlgefrOn45vSZWUbWs4 AOpQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e4-v6si2218268pln.655.2018.02.23.11.44.42; Fri, 23 Feb 2018 11:44:56 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754848AbeBWTn7 (ORCPT + 99 others); Fri, 23 Feb 2018 14:43:59 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:44924 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934385AbeBWSsZ (ORCPT ); Fri, 23 Feb 2018 13:48:25 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 0BEB9FDC; Fri, 23 Feb 2018 18:48:24 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Greg Kroah-Hartman , Arnd Bergmann Subject: [PATCH 4.9 136/145] binfmt_elf: compat: avoid unused function warning Date: Fri, 23 Feb 2018 19:27:22 +0100 Message-Id: <20180223170742.299355660@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180223170724.669759283@linuxfoundation.org> References: <20180223170724.669759283@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Arnd Bergmann When CONFIG_ELF_CORE is disabled, we get a harmless warning in the compat version of binfmt_elf: fs/compat_binfmt_elf.c:58:13: error: 'cputime_to_compat_timeval' defined but not used [-Werror=unused-function] This was addressed in mainline Linux as part of a larger rework with commit cd19c364b313 ("fs/binfmt: Convert obsolete cputime type to nsecs"). For 4.9 and earlier, this just shuts up the warning by adding an #ifdef around the function definition. Signed-off-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman --- fs/compat_binfmt_elf.c | 2 ++ 1 file changed, 2 insertions(+) --- a/fs/compat_binfmt_elf.c +++ b/fs/compat_binfmt_elf.c @@ -51,6 +51,7 @@ #define elf_prstatus compat_elf_prstatus #define elf_prpsinfo compat_elf_prpsinfo +#ifdef CONFIG_ELF_CORE /* * Compat version of cputime_to_compat_timeval, perhaps this * should be an inline in . @@ -63,6 +64,7 @@ static void cputime_to_compat_timeval(co value->tv_sec = tv.tv_sec; value->tv_usec = tv.tv_usec; } +#endif #undef cputime_to_timeval #define cputime_to_timeval cputime_to_compat_timeval