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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 072C7C43334 for ; Mon, 20 Jun 2022 18:38:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343495AbiFTSik (ORCPT ); Mon, 20 Jun 2022 14:38:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48004 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343657AbiFTSie (ORCPT ); Mon, 20 Jun 2022 14:38:34 -0400 Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 81862BC32 for ; Mon, 20 Jun 2022 11:38:33 -0700 (PDT) Received: by mail-ej1-x635.google.com with SMTP id fu3so22790962ejc.7 for ; Mon, 20 Jun 2022 11:38:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=gy68BNl0x7CDDp2EHogXVg4xgL7xvnIGrRM8Vd3wExM=; b=LwNNHhBLLVDtr02cqaL7ilKF34nB4GbqqJSxJ075ClON6bb3hzrA78mpnxOIVRUK83 xPRU1e7VUCsARi2ebSr96PFT7fKHuodE6mv22PHqwLKCXXmKTRBi5vrWaFR4V5oWIIzE wXwrXrvOZqMWUpvL7Y9315+QpuqzFUgKc6x89QJURjsHOLNZWvM5xJwCL93eBgWCmLdh BX+SFKudDjDfYoIpuUoi4rZR0o3T6HPINbniwQRI25apX/yIooiynRpt6ZTVJlVR3ah6 TH1FKLxXud3MLnxECr+mrBB2ejyzox7EKejlFofFMJ0gZ2bVKrY7WB3+OgiD2Xd4vLVt ofUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=gy68BNl0x7CDDp2EHogXVg4xgL7xvnIGrRM8Vd3wExM=; b=Kt6JiIgRbGQpr9UHVkeXwVg+Sw0URiVlgAqC4oCZBKxc9ym+rDQGpJDI8zR/5zQY99 OqPATYDFwSsLzPWtE7AxXvwVaRasPoQ6uhlvyDxKNqEWIAVIaYQ4B8+4XUhMCPs/EmCe WFPRfq4LOrFEwbkE52p07uIX+QIfEX6KRElPNMDguE/M0pgYawb9oE0Q7FRa8xx3ahA9 qY38SfSr4SLmWaD6kUKiJqj2/wCGXD4qJXJuZEHeDeNzzlvNcJUgmKpnFD+FlV62vBFB Oedozrog8222i87x1xbLIH7P57Tk5mfBbyWlfV7O+pdCRFkT5PZadjkIMEqm8s3OMMhP zBhQ== X-Gm-Message-State: AJIora+yOzmlYsGMiRaIYc8nkIW073VeYyMKUF5qI9DfTIQociJl8g8L 3zSkmLoowhd0nYFuQNHgfCXDEg== X-Google-Smtp-Source: AGRyM1uiFV4GB0pnqPs9igkVC3/+a1NihiI/69f9Jhtrze9qPjPVW38mfDN5U78ZFoa8w/F3AJdUVw== X-Received: by 2002:a17:907:c71b:b0:718:d0a2:a447 with SMTP id ty27-20020a170907c71b00b00718d0a2a447mr22421954ejc.157.1655750312126; Mon, 20 Jun 2022 11:38:32 -0700 (PDT) Received: from [192.168.0.211] (xdsl-188-155-176-92.adslplus.ch. [188.155.176.92]) by smtp.gmail.com with ESMTPSA id us12-20020a170906bfcc00b00709e786c7b2sm6428225ejb.213.2022.06.20.11.38.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 20 Jun 2022 11:38:31 -0700 (PDT) Message-ID: Date: Mon, 20 Jun 2022 20:38:30 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH v2 1/2] soc: qcom: cmd-db: replace strncpy() with strscpy_pad() Content-Language: en-US To: Andy Gross , Bjorn Andersson , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Stephen Boyd References: <20220519073301.7072-1-krzysztof.kozlowski@linaro.org> From: Krzysztof Kozlowski In-Reply-To: <20220519073301.7072-1-krzysztof.kozlowski@linaro.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 19/05/2022 09:33, Krzysztof Kozlowski wrote: > The use of strncpy() is considered deprecated for NUL-terminated > strings[1]. Replace strncpy() with strscpy_pad(), to keep existing > pad-behavior of strncpy. This fixes W=1 warning: > > drivers/soc/qcom/cmd-db.c: In function ‘cmd_db_get_header.part.0’: > drivers/soc/qcom/cmd-db.c:151:9: warning: ‘strncpy’ specified bound 8 equals destination size [-Wstringop-truncation] > 151 | strncpy(query, id, sizeof(query)); > > [1] https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings > > Signed-off-by: Krzysztof Kozlowski > Reviewed-by: Stephen Boyd Any comments on the set? Best regards, Krzysztof