Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp817164imm; Thu, 26 Jul 2018 12:30:54 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdrfCEBuiZD6f6VFhfwGW95LIWLNE/09UD3vqfLvsbiIUEkBOW9O9zVo45qTYHf90bg9KiS X-Received: by 2002:a65:57c9:: with SMTP id q9-v6mr3206547pgr.128.1532633454496; Thu, 26 Jul 2018 12:30:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532633454; cv=none; d=google.com; s=arc-20160816; b=gw+n2apMHtgRZGPhMQDg1iD4nLMocQCCnqpf6eNbjztmF4CTdy58fpKjqOqGXAQx16 5GWp+MHRTiyi9SEnPXEd6Dz+WDJJ/8kvgamwNgo4qczqOltbMwI7wmnBChLftWVpRzCx MXnQ3fm5RNbQN69sAa+bTcmf2HZ78alFBF8g7WX6+f0pt1IRoqrAtx1sty3yrDhSZxeO ieh+O3H69njsWUhPfgGt/JTWpeVr2XIdLpDv/ePNWJFzxPVqEPOX7mWZZ4U67q0NpYxR LfjdBMh97w7zIOSUQaMtrT1JPBF2hq1Bjd+EFZVIQRimefgBMguaoxv0OtAuQLm6lKQ0 j30A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=Evp98q7TGeMLWouw7IQaHciQ+h+CQTbno8nBiuRGlm0=; b=WWhQuryxNBHZuujNHy/CBJu1Pp9VSMhllX7sk4R+4T+5JZdrc/nRNyh6SdFaD2eOd4 EhJe/NVIeSs/7sI2ASgouGb/pcEPYfhBqJ4vvZ82sr+bFOM5MI8eABE8DHwTqAym3sYY X2Vsy/mGeUhHdemDSEIV9/uOhXOfGOdCef0N7pSfQo9Jy8jhuY6GofkL+ziqf8/aX4xB knDNvi4VzxLjYbADjfIMS4SRdFCvIthzovpYH/egyUAwFbxzxsC6jkiJ8p+jNxZ7TCjd V7w8NsFWac7mD3oGlx5VrlmG4cIsEdJngEyUaNEBCZvuWQT+GKTxrUMgSEvfDkll0t2I DT3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=fj3clX6H; 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 k128-v6si2129445pfc.181.2018.07.26.12.30.39; Thu, 26 Jul 2018 12:30:54 -0700 (PDT) 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; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=fj3clX6H; 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 S1731409AbeGZUrg (ORCPT + 99 others); Thu, 26 Jul 2018 16:47:36 -0400 Received: from merlin.infradead.org ([205.233.59.134]:42558 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730474AbeGZUrf (ORCPT ); Thu, 26 Jul 2018 16:47:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=Evp98q7TGeMLWouw7IQaHciQ+h+CQTbno8nBiuRGlm0=; b=fj3clX6HWMJtmSku6ovk0EKnmX Ac3PbXd6WUUJx+EbvONznQ42foJ9b18EWH6KaV+DjukN7+eUK4Ge1O8Y2LrKW/tpVJg4vbBM45fGL NJ+h4X72EOmg8f7NQq2PoIhHRgDiOmm5kSBYaUJ0E/oa/rtlKK+xol0H1J1604wWZMQ1wBtk6UT0K T4/9DKGvJb2Yo7c4FbWT9xIczfvb5XGhzoP+xnwkMbOcbnOljO2mwJgOFgZ2pzL+fc6ogJBb/9sEm EFr7b2/g2EGDVTmA/6nuNsuuaEy4tyAeOvOVmSxdSFnn0e/w4IPFg2Zm2NOf5VAROWT7v1eX4rjHV HqJGplVA==; Received: from static-50-53-52-16.bvtn.or.frontiernet.net ([50.53.52.16] helo=midway.dunlab) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1filwq-0006ZO-4x; Thu, 26 Jul 2018 19:29:16 +0000 Subject: Re: m68k allmodconfig build errors To: Finn Thain Cc: Andreas Schwab , LKML , Geert Uytterhoeven , linux-m68k@lists.linux-m68k.org References: <28ebe45d-3dbd-2a82-f537-b0725f7a2bcf@infradead.org> <878t66idai.fsf@igel.home> <94dc0357-10d4-c3dc-ef2a-9643f08d2a09@infradead.org> From: Randy Dunlap Message-ID: <761399f0-0b10-716c-1e80-cfb19c06e455@infradead.org> Date: Thu, 26 Jul 2018 12:29:10 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/23/2018 09:49 PM, Finn Thain wrote: > On Mon, 23 Jul 2018, Randy Dunlap wrote: > >> On 07/20/2018 12:20 AM, Andreas Schwab wrote: >>> On Jul 19 2018, Randy Dunlap wrote: >>> >>>> block/partitions/ldm.o: In function `ldm_partition': >>>> ldm.c:(.text+0x1900): undefined reference to `strcmp' >>>> ldm.c:(.text+0x1964): undefined reference to `strcmp' >>>> drivers/rtc/rtc-proc.o: In function `is_rtc_hctosys': >>>> rtc-proc.c:(.text+0x290): undefined reference to `strcmp' >>>> drivers/watchdog/watchdog_pretimeout.o: In function `watchdog_register_governor': >>>> (.text+0x142): undefined reference to `strcmp' >>> >>> GCC has optimized strncmp to strcmp, but at a stage where macros are no >>> longer available. I think the right fix is to use strcmp directly, >>> since strncmp doesn't make sense here. >> >> Hi Andreas, >> >> I don't see that all of these string compare fields are null-terminated. >> > > Some of the strncmp calls in ldm.c are null-terminated, some are not. > > That would imply that the compiler will emit both strcmp and strncmp > calls. > > A strncmp call isn't a problem, because m68k doesn't define > __HAVE_ARCH_STRNCMP and so the one from lib/string.c gets built. > >> How does one convert strncmp() users to strcmp()? >> >> thanks, >> > > The untested patch below may work. It seems that it may be relevant to > both arc and m68k: I got back to looking at the build errors. I agree with Andreas that all of the fields in question are null-terminated, so Finn's patch looks good to me. -- ~Randy