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=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED 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 68314C43381 for ; Wed, 13 Mar 2019 20:12:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4199B2146E for ; Wed, 13 Mar 2019 20:12:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726983AbfCMUMY (ORCPT ); Wed, 13 Mar 2019 16:12:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:41292 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726981AbfCMUMY (ORCPT ); Wed, 13 Mar 2019 16:12:24 -0400 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7745B20693; Wed, 13 Mar 2019 20:12:22 +0000 (UTC) Date: Wed, 13 Mar 2019 16:12:21 -0400 From: Steven Rostedt To: Rasmus Villemoes Cc: Nick Desaulniers , Andrew Morton , clang-built-linux@googlegroups.com, Linux Kbuild mailing list , "# 3.4.x" , Nathan Chancellor , Adhemerval Zanella , Arnd Bergmann , James Y Knight , Masahiro Yamada , Alexander Shishkin , Ingo Molnar , Greg Kroah-Hartman , Dan Williams , Andy Shevchenko , LKML Subject: Re: [PATCH v2] lib/string.c: implement a basic bcmp Message-ID: <20190313161221.41797313@gandalf.local.home> In-Reply-To: <65c69aac-696c-0534-2243-679db926d527@rasmusvillemoes.dk> References: <20190313181719.87859-1-ndesaulniers@google.com> <20190313144013.37cab5c7@gandalf.local.home> <20190313150133.117e2b63@gandalf.local.home> <65c69aac-696c-0534-2243-679db926d527@rasmusvillemoes.dk> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Wed, 13 Mar 2019 20:34:11 +0100 Rasmus Villemoes wrote: > Yes, but let's completely avoid mentioning memcmp in the summary. > > bcmp - return 0 if and only if the buffers have identical contents > @a: pointer to first buffer > @b: pointer to second buffer > @len: size of buffers > > The sign or magnitude of a non-zero return value has no particular > meaning, and architectures may implement their own more efficient > bcmp(). So while this particular implementation is a simple (tail) call > to memcmp, do not rely on anything but whether the return value is zero > or non-zero. Acked-by: Steven Rostedt (VMware) Thanks! -- Steve