From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 213E3C49ED9 for ; Thu, 12 Sep 2019 07:22:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id ECA92214AF for ; Thu, 12 Sep 2019 07:22:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="uHa+xmaO" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729894AbfILHWS (ORCPT ); Thu, 12 Sep 2019 03:22:18 -0400 Received: from mail-wm1-f68.google.com ([209.85.128.68]:35745 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726952AbfILHWS (ORCPT ); Thu, 12 Sep 2019 03:22:18 -0400 Received: by mail-wm1-f68.google.com with SMTP id n10so6288149wmj.0 for ; Thu, 12 Sep 2019 00:22:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=2CeyyRMj4arJ5MswszulwIkFPEnYjRfvfQK3SvLqDb4=; b=uHa+xmaO71Z9V5NADf0EW/N3p8Lfp6Gh70zeI1lwSwUqnLY3Zq8o1tjnDFog8Fx0E0 T3sd/B5YgC7nA96ysGGDf66YduYOzOEEDWDkuDyvgS3eCy1+s21RXjsXzIhnnfOlOabW BqZqKzxAYHs7z2i6TGG/V5/ItKvdZrPvtUOEU77ZUANzbu1SRp3MbI/lf/Ofd1ZcB+Jk 79ipOSIQVRd8HjL+wLAyz6Hh23WC5nqjMu7ULFCO5XtSarCtayxQ07lC8tT8mAIRAIsE AbaQ0E+iWOhLD9aVhX1/HkUKJEKZ46XP0FfuL0dX2EcKB1GVv1fQS+q7knQCCW07waJn TVhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=2CeyyRMj4arJ5MswszulwIkFPEnYjRfvfQK3SvLqDb4=; b=O6VyFQ9ekJmIchUNaGJALEb2qqlNMI9J/NuqB1muuP1SQLbRLblarwdJv0X5ujxWw1 1T+Om+F/GLrOyJd3Mwj1Klc8nJ7jHuyDDM5Ls0mfcad3lT9tiWrUeR3PYrfOE6VaA4+1 Ybz8nDZx+pFlJOS9yVakFpgUP+DcKZDX7XbqfRZkM3ZV4NShBKSyRyO8zOCbnCHVY6/5 gX3inrvqB9NV+X9SpBxsgChgS29ubmfV78ll8k/+8ZlgY1PcPV2mHc+EggqRaxwD9yPy K3y9yOIMsWroir8WQnyk14y6lE3CqaCiTgKXfz3dQeNS+HL69dijwBR2G3dhMxtmOi7A B6bA== X-Gm-Message-State: APjAAAXPqQ7Nuz5aBqkcuUsoYRxoFFf7YvUKwBMRLQLBtmyLkKdFQJyK 4kmpTynOZM5QhWewVwCwP7o= X-Google-Smtp-Source: APXvYqxe/tEJkeMm4EqKT/2Wy92fFk11UiYijbXGUlV2E0QrZ2KOdbdso3/sXFTOWlF7WUwp2RRm8w== X-Received: by 2002:a1c:7f86:: with SMTP id a128mr7336940wmd.104.1568272936590; Thu, 12 Sep 2019 00:22:16 -0700 (PDT) Received: from localhost.localdomain ([2a01:4f8:222:2f1b::2]) by smtp.gmail.com with ESMTPSA id b144sm5382465wmb.3.2019.09.12.00.22.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Sep 2019 00:22:16 -0700 (PDT) From: Nathan Chancellor To: Greg Kroah-Hartman , Sasha Levin Cc: stable@vger.kernel.org, clang-built-linux@googlegroups.com, Ilie Halip , Nick Desaulniers , Zhenzhong Duan , Thomas Gleixner , Nathan Chancellor Subject: [PATCH 4.4] x86, boot: Remove multiple copy of static function sanitize_boot_params() Date: Thu, 12 Sep 2019 00:21:48 -0700 Message-Id: <20190912072146.68410-1-natechancellor@gmail.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Zhenzhong Duan commit 8c5477e8046ca139bac250386c08453da37ec1ae upstream. Kernel build warns: 'sanitize_boot_params' defined but not used [-Wunused-function] at below files: arch/x86/boot/compressed/cmdline.c arch/x86/boot/compressed/error.c arch/x86/boot/compressed/early_serial_console.c arch/x86/boot/compressed/acpi.c That's becausethey each include misc.h which includes a definition of sanitize_boot_params() via bootparam_utils.h. Remove the inclusion from misc.h and have the c file including bootparam_utils.h directly. Signed-off-by: Zhenzhong Duan Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/1563283092-1189-1-git-send-email-zhenzhong.duan@oracle.com [nc: Fixed conflict around lack of 67b6662559f7f] Signed-off-by: Nathan Chancellor --- Hi Greg and Sasha, Please consider applying this to 4.4 as it resolves a compilation error with clang on 4.4 and it has already been applied to 4.9 and newer: https://travis-ci.com/ClangBuiltLinux/continuous-integration/jobs/232287034 https://github.com/ClangBuiltLinux/linux/issues/654 Thanks to Ilie Halip for debugging this; TL;DR: clang pretends that it is GCC 4.2.1 for glibc compatibility and this trips up a definition of memcpy for GCC < 4.3. This is not an issue on mainline because GCC 4.6 is the earliest supported GCC version so that code was removed and this patch resolves it because string.h redefines memcpy to a proper version. arch/x86/boot/compressed/misc.c | 1 + arch/x86/boot/compressed/misc.h | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/boot/compressed/misc.c b/arch/x86/boot/compressed/misc.c index 16df89c30c20..1e5b68228aff 100644 --- a/arch/x86/boot/compressed/misc.c +++ b/arch/x86/boot/compressed/misc.c @@ -11,6 +11,7 @@ #include "misc.h" #include "../string.h" +#include /* WARNING!! * This code is compiled with -fPIC and it is relocated dynamically diff --git a/arch/x86/boot/compressed/misc.h b/arch/x86/boot/compressed/misc.h index 4abb284a5b9c..bce182708814 100644 --- a/arch/x86/boot/compressed/misc.h +++ b/arch/x86/boot/compressed/misc.h @@ -19,7 +19,6 @@ #include #include #include -#include #define BOOT_BOOT_H #include "../ctype.h" -- 2.23.0