Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2258523ybl; Thu, 15 Aug 2019 08:58:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqxrFrfXPVmjFO2j3xis/2i+jdZoL2xzqyAV8GedUyiB8vS272RAEQmnEtAt0NdkIZ8TRUmp X-Received: by 2002:a63:e010:: with SMTP id e16mr3947508pgh.285.1565884703245; Thu, 15 Aug 2019 08:58:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565884703; cv=none; d=google.com; s=arc-20160816; b=xN2vRBFqoA4BblnpO1M6c6CjZ4JL1kfkvPffSwz7HOfYi4Rqm2GAIPUipBbYXGQbjx C5j2DF34u0wBhgK2yrXdXgoxuJdGOX96RWio0dgmFdeSzO2BpMxjrVrtqzC0s3r0Icss e6NRENm56DHIwMVNX93Xuimk9Llh7NJUz4ngU3aNmw8O2ComCzBre3EyL92YwdhWGpCC IO4IItVSr0C6+lp5KOvhl1TYmB07WmqLg7GchLNjX/SYcznvYLa6+lg93A+xHbCenRgF STTwdnPG2GNgPPfBVbPwS/6gDNJRuoOpROmLgLk7leaSDbcC2o5JRJHHpcmXkVTJdK7f bXUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=o3UNVvRcqgknRSbay7FUCJDbPbxBrvPJzPpgYbJ5C2I=; b=QMah6OH5mj5morcLOewiyHOdDiDJwf3iqa8CWAn9VrE0joaXlBUuGeEWlmNND9547r Y96PDwTTlrGup6q9GryRtXDArE/5pxP5yyM/WadSEwdjaRKotsUy6Dlwg6zpiNWTNSmg hLD6I5lHCR2gyXb2y06PMLseAm86Pf8WdHag+e02n1ggYaoMyumyS5fF5+Q2eASObUIX c6PwF+QFCmMWTn+yHQHAYILzdOSvQ1ltRaDge0GKYSxWZeWmvQVWoNwxvdNyf+b838Tp 84GxHBO1h7ObufSYpJr9EKqFP/LRw99+rI48KUWkHQD1b+lFJvcvryKBCUJ/du2Aq+9H MGfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Prv6gJ49; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a22si1188863pjv.56.2019.08.15.08.58.07; Thu, 15 Aug 2019 08:58:23 -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=pass header.i=@gmail.com header.s=20161025 header.b=Prv6gJ49; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730245AbfHOPdO (ORCPT + 99 others); Thu, 15 Aug 2019 11:33:14 -0400 Received: from mail-ed1-f68.google.com ([209.85.208.68]:35991 "EHLO mail-ed1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730049AbfHOPdO (ORCPT ); Thu, 15 Aug 2019 11:33:14 -0400 Received: by mail-ed1-f68.google.com with SMTP id p28so2455313edi.3 for ; Thu, 15 Aug 2019 08:33:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=o3UNVvRcqgknRSbay7FUCJDbPbxBrvPJzPpgYbJ5C2I=; b=Prv6gJ49GcEBNbk0/Clw83UxMI9ce4oqQdlks9MrqN+WhicI+zhIDx3+DDoCJ35m/B K+q/KeUJLtWkumLEJxbQz8K+gqTatV+Riw/mLh2ZUzYYuBv8NRGNzVdMRgmMdimhiDFb yGoZr9lQtNJreo6tXcJO2em4iw5bILHe2IM1U5TUOElZiqxa5ilQ9hSxmc4hDGsD4gAh qCzf4IlbcsSrPXvgtVfi57wm8o+MaKG94oN/TfisMac7+pOsym5cw+k/DE/r/I9xaIzv azrTFF/IA7bkyp86T5QI4DJDBUI/ya1BKaPxtq9bcmgsA65E3v/thjM5DvfshpxaG5zC agKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=o3UNVvRcqgknRSbay7FUCJDbPbxBrvPJzPpgYbJ5C2I=; b=MjLF1p+NhkmrEM2hd1og/WYhcPA9u1T/r8L48O5ZkrYPX2hxu3HcD3TPDEZgx+DQGF 3wQcN4DFARrc670nyM7NohDNmXq9YRQnkP4uIH7bBuvgqWzuk1b9D8FArxvxmYWRyWCJ 1p2fCH9DKSCyooFtm9D3w0kGsNCGALjprgqtz7RBozXnlfE33zJnglAul0J0j8LnGCFd /q2X2Pnqdmi/tW+koP8kJoViYlmsCKrHW7ty/yyqX63QTmFSxFqzUevw+zzaAK5/qNse ov5Q5BszSSlzXC1efyrPUBpzzNukMakLWXtc02br9rAmST4TLP/yh03/mMzLOnXHyj0Y OtTw== X-Gm-Message-State: APjAAAU1E+U+Op+hqEll5ikHI24JKRyDlZVQsU90AV+xdqWC+OVLOm4s JySMKxdGpty4Xw1Zwyi2MQvJdSV8wgKhkGPN1Yg= X-Received: by 2002:a05:6402:1344:: with SMTP id y4mr6022183edw.124.1565883192450; Thu, 15 Aug 2019 08:33:12 -0700 (PDT) MIME-Version: 1.0 References: <20190809071034.17279-1-hslester96@gmail.com> <20190814104941.qt66ozcau5fdswcs@pathway.suse.cz> <20190815075033.GA26479@tigerII.localdomain> <20190815135221.qcgerido7aahmpgn@pathway.suse.cz> In-Reply-To: <20190815135221.qcgerido7aahmpgn@pathway.suse.cz> From: Chuhong Yuan Date: Thu, 15 Aug 2019 23:33:01 +0800 Message-ID: Subject: Re: [PATCH v4 4/8] printk: Replace strncmp with str_has_prefix To: Petr Mladek Cc: Sergey Senozhatsky , Steven Rostedt , LKML 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 On Thu, Aug 15, 2019 at 9:52 PM Petr Mladek wrote: > > On Thu 2019-08-15 16:50:33, Sergey Senozhatsky wrote: > > On (08/14/19 12:49), Petr Mladek wrote: > > > On Fri 2019-08-09 15:10:34, Chuhong Yuan wrote: > > > > strncmp(str, const, len) is error-prone because len > > > > is easy to have typo. > > > > The example is the hard-coded len has counting error > > > > or sizeof(const) forgets - 1. > > > > So we prefer using newly introduced str_has_prefix() > > > > to substitute such strncmp to make code better. > > > > > > > > Signed-off-by: Chuhong Yuan > > > > > > Reviewed-by: Petr Mladek > > > > Reviewed-by: Sergey Senozhatsky > > Chuong Yuan, should I take this patch via printk.git? Or will > the entire series go via some other tree, please? > I think that it goes via printk.git is okay, thanks! > Best Regards, > Petr