Message ID | 20180301152515.27004-1-robh@kernel.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DFD2660365 for <patchwork-linux-arm@patchwork.kernel.org>; Thu, 1 Mar 2018 15:25:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CE8E128471 for <patchwork-linux-arm@patchwork.kernel.org>; Thu, 1 Mar 2018 15:25:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C148C284F4; Thu, 1 Mar 2018 15:25:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A3AF628471 for <patchwork-linux-arm@patchwork.kernel.org>; Thu, 1 Mar 2018 15:25:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=YkZXwba02DfASwMlQWaJoHyKtN1Rgttf2Ug2JRXLxwU=; b=MML u3WzDm4T/W9/Wxz+eDkIp7RlWz3GvXcvfHDBiNKItin6B9c8YlUnBfNrEsSRFLCsJrkL7Ih6z4OLo oEAux1veIhiMRF4Mu6qhwhujb8/WLExgq5Myhhbs8/HlcKv3VifcCPAvnmX1sxi5mtGe1s1aspyi6 nlCGTby88UbFSqGxiTr5xkZvWUiLaiaTIWf1IDXoh2XCRQbXiI7sWj3syOxBEarw0L+sAm1qHVkoI ds5jmPt9gRhd/vy3PjowoO9dfxS35p+4xsUCwdG6b4TD8130IT6D+GoiD2ZAffQv1yUTBfuif8Dea hVyTGK4fffTCTKNToEnYMUGBPPXsL9w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1erQ5V-00072N-Ox; Thu, 01 Mar 2018 15:25:41 +0000 Received: from mail-oi0-f66.google.com ([209.85.218.66]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1erQ5Q-0006Xd-7e for linux-arm-kernel@lists.infradead.org; Thu, 01 Mar 2018 15:25:38 +0000 Received: by mail-oi0-f66.google.com with SMTP id u73so4749245oie.3 for <linux-arm-kernel@lists.infradead.org>; Thu, 01 Mar 2018 07:25:25 -0800 (PST) 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; bh=0qffWDzeQnhgOgm8/by8UygPdRWJWSHcL0p264d27ZE=; b=gqBrUUQCswj0Qi71KktdxkXl67ABENd1YqiccUx/oQhgxwl4Bt8lp54BW1JnXoID6S Ym2lEd2ZkytkuDAj0ESa43K073MumTbMg7M8LTufaOwl44c6ppIoMdI8OZU2QpHnC5Ve zdXqajRwkNogB6liSVhAauzKlsQi6KwCR2kNmd3+9FzWlq8fc6B7NtYXIv7rc0ibfucx iQOYLmuqGyGFlgMHsNScUS/Do6iv/P0Ztws1Ciw+17a9+Ob1V+nfbJE6wMGx2xBtV2vB WR22/35UzSTn2L/7jka5mekt3wxnPCg/6vaau2BgLqzgAhLKsLNV1uBpInaT0NAQfSwe RrSw== X-Gm-Message-State: AElRT7E55awdsloc7WhsjG11aWq+ybDQqY14AnYKAx0vrRyxnxNTCbLT k4hLxKr0LU8GGOBRoJd5AKyXcyI= X-Google-Smtp-Source: AG47ELvTFYpoJtjZ0VfAedoag/Iymu9GoXQyK7/lnC8GNkpwsUVz2SV9hvtbQKAuoq5EK4/fDWbjnw== X-Received: by 10.202.219.67 with SMTP id s64mr1394436oig.303.1519917924856; Thu, 01 Mar 2018 07:25:24 -0800 (PST) Received: from xps15.herring.priv (216-188-254-6.dyn.grandenetworks.net. [216.188.254.6]) by smtp.googlemail.com with ESMTPSA id t19sm2038662oie.33.2018.03.01.07.25.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 01 Mar 2018 07:25:16 -0800 (PST) From: Rob Herring <robh@kernel.org> To: Russell King <linux@armlinux.org.uk> Subject: [PATCH] ARM: boot: add strrchr function Date: Thu, 1 Mar 2018 09:25:15 -0600 Message-Id: <20180301152515.27004-1-robh@kernel.org> X-Mailer: git-send-email 2.14.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180301_072536_369478_99CB1972 X-CRM114-Status: GOOD ( 12.89 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/arch/arm/boot/compressed/string.c b/arch/arm/boot/compressed/string.c index 13c90abc68d6..ade5079bebbf 100644 --- a/arch/arm/boot/compressed/string.c +++ b/arch/arm/boot/compressed/string.c @@ -121,6 +121,16 @@ char *strchr(const char *s, int c) return (char *)s; } +char *strrchr(const char *s, int c) +{ + const char *last = NULL; + do { + if (*s == (char)c) + last = s; + } while (*s++); + return (char *)last; +} + #undef memset void *memset(void *s, int c, size_t count)
libfdt gained a new dependency on strrchr, so copy the implementation from lib/string.c. Cc: Russell King <linux@armlinux.org.uk> Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Rob Herring <robh@kernel.org> --- Please ack. This is a dependency for dtc/libfdt sync with upstream. arch/arm/boot/compressed/string.c | 10 ++++++++++ 1 file changed, 10 insertions(+)