From patchwork Mon Apr 12 08:41:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 419522 Delivered-To: patch@linaro.org Received: by 2002:a02:c4d2:0:0:0:0:0 with SMTP id h18csp1572315jaj; Mon, 12 Apr 2021 02:18:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzE4Ehxl/V/6VdT3qjNJuymBRqd49ARapW4woh7ZJO/4h/oL6QDnZIH22iCSq7A4WgqvnBg X-Received: by 2002:a62:1b05:0:b029:244:e6ae:7f58 with SMTP id b5-20020a621b050000b0290244e6ae7f58mr18886259pfb.75.1618219100467; Mon, 12 Apr 2021 02:18:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618219100; cv=none; d=google.com; s=arc-20160816; b=Psb8bGDbm4ILge++ble0YyvErS3eFCTliojxp6qtl4Tipc7S59R2A9ySW/IMg9kfcL oHuCO/U/LqilGbfwQEnVhl2lNTbFuJKYqslDOedPri5tJDIR+b6Z0bhR1YvqIyBdS6Ng gZKAxTU/I3xhlRQg2AErcNakkaYYieKz2jNMoua2w8QSveIHxv8CvHuRjwwA6jro40k6 /NdRuwR7wqyiKWuwb++laZMKKyWlUosZr/BZwmpI+E1NaSLt5WnN+XnEV/Bi68Y41Awy bo1/Z3uVpKiZCvjSU5qBtX4E5qIs0CjVDNnQUTO1XFMmxBwhBNi0Ga0aSqBUwdmryVKQ +eZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=2SG4c2Bfoh8bx0DucewTZI1AGK/0WgypQ5x0hSprm4Q=; b=DbYE781sGWcoFC4+TwoO1HhrGG0VQcEiD/x4s1zWD2hnQ/wZj40AOj0Uvrg6Mf8wur 045OnszHr4x6zjyE40Fi2b7kKO63KsKeyc6MGOGJC5xdhiAFb6CWC/pf9z44xjOlewFK LPBJJ1ZWSMlFo2ra8x2QWTTFnpiGb1FsUHbismBB+H0u1zsus5ue3CbZdpqir7+Ral4j /VzkUfNb6jDotnJgp1npPbnX5sh4wepsOG42HmNZyx944es0XSwZHJ9ZHZnUb70PDV6b tduGEaZ+O6E9p7/bN/N24fAlRG6FJTG3KC+q+Pmimgt8ubZtQaFrls5H7wqPYbR843hp NvBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=qDcpZb1B; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r15si12368322pga.317.2021.04.12.02.18.20; Mon, 12 Apr 2021 02:18:20 -0700 (PDT) Received-SPF: pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=qDcpZb1B; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240306AbhDLJOa (ORCPT + 12 others); Mon, 12 Apr 2021 05:14:30 -0400 Received: from mail.kernel.org ([198.145.29.99]:34282 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240869AbhDLJLH (ORCPT ); Mon, 12 Apr 2021 05:11:07 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8BAC561379; Mon, 12 Apr 2021 09:07:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1618218422; bh=ycZ+K1QVjJVrFHKx6vy53aD6c9O5+ao7tn+zuFkruNw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qDcpZb1BC2PX9x5N/tTcWLWwvL7mZuOh/bedjF1etgxi0pFTNL97gwWEOhYM7jEpA JcNMF2SNtGvIAJPQOzF2JXjoO193Imp69XtT/EwPhNfJVOG8L2GqhDp0USWKZUClhR uJr0VpABhDHgCxN19etfaALmq9deW5YxbWkH5NEE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arnd Bergmann , Ingo Molnar Subject: [PATCH 5.11 192/210] lockdep: Address clang -Wformat warning printing for %hd Date: Mon, 12 Apr 2021 10:41:37 +0200 Message-Id: <20210412084022.410153507@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210412084016.009884719@linuxfoundation.org> References: <20210412084016.009884719@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Arnd Bergmann commit 6d48b7912cc72275dc7c59ff961c8bac7ef66a92 upstream. Clang doesn't like format strings that truncate a 32-bit value to something shorter: kernel/locking/lockdep.c:709:4: error: format specifies type 'short' but the argument has type 'int' [-Werror,-Wformat] In this case, the warning is a slightly questionable, as it could realize that both class->wait_type_outer and class->wait_type_inner are in fact 8-bit struct members, even though the result of the ?: operator becomes an 'int'. However, there is really no point in printing the number as a 16-bit 'short' rather than either an 8-bit or 32-bit number, so just change it to a normal %d. Fixes: de8f5e4f2dc1 ("lockdep: Introduce wait-type checks") Signed-off-by: Arnd Bergmann Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20210322115531.3987555-1-arnd@kernel.org Signed-off-by: Greg Kroah-Hartman --- kernel/locking/lockdep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/kernel/locking/lockdep.c +++ b/kernel/locking/lockdep.c @@ -705,7 +705,7 @@ static void print_lock_name(struct lock_ printk(KERN_CONT " ("); __print_lock_name(class); - printk(KERN_CONT "){%s}-{%hd:%hd}", usage, + printk(KERN_CONT "){%s}-{%d:%d}", usage, class->wait_type_outer ?: class->wait_type_inner, class->wait_type_inner); }