Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp1120896rdb; Fri, 16 Feb 2024 06:07:38 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCX8prIshgiZxGQ1WxpaDViNIHFhkBtjn3Rv8YXYjhWMZ4vRO2ClgE49+RhykDdP9SdRzULxONRJ+yxk11i3H/kowo0AOvBnDqy9tX1n8Q== X-Google-Smtp-Source: AGHT+IHNHsEd5clMhvEN8nlgQK5rnu+nqMurEuKtdvzlgJDzT+jBTtMECAp/xYak9KP4trfna39N X-Received: by 2002:a05:6a21:2d0b:b0:19c:8a1a:d9a8 with SMTP id tw11-20020a056a212d0b00b0019c8a1ad9a8mr5284594pzb.42.1708092458623; Fri, 16 Feb 2024 06:07:38 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708092458; cv=pass; d=google.com; s=arc-20160816; b=ocCH7NwnO+vnwOcknR02DQye7hBkhlShrRlsG0/vTBb6HUnplSmXA3MpE3oJ6cqHUT UqVyZlSJmMcBa8/dlDwKRD1pJw6eid6jx14WRALMliWgGg+5mICcDEn+zHYYaISpGN/p glqB8tEZ4NcSux50eU6qJy723EhvQWwoFqy+nabHrXcgaOihw+4ADoIBu3rMc1G0MKzp XuICeZB98G27d3QbD9Oah2XcW0m5La+9tu4/STTsJ39Nsp24Gv8V5TrTkMyGN8DJPjvd wZZnb/IA9MJ6Yv5gslOoGfbxNO92Fvssg/e3rZFnEAB9ckUrh1y/mRN5kAIFOJOOp6EQ qWQg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:subject:cc:to:from:date:references :in-reply-to:message-id:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:user-agent:feedback-id:dkim-signature :dkim-signature; bh=xFinwvZsrlvUGjNZQPKThE+p8vedvK1faZDi1/Ymc0w=; fh=Cx6H/gYl4Xj6aNbGWBvQEY9jpsazzgI3KE5rjWo+idk=; b=r+IiVyWgslMMW6ms6+wZPbI39CpwDpSR8A3B4b50GBu7xrnz+FxjR0csc73XrexMXu qG5ugQUJWH3hfFMfSaMVJ68kG4AhF8tk1GSATSj0GSGuq4uYO6L5gURzeptNG37eosBp 106jdU3w8tjXjWfm0yLI4E6Wy7RqLJG8hnZdd9puaEXsKnmAKNH174fTn2WFKZ5Q0x4Y Yx2T38nIfAF9xb3ym97aw+6Nl9qFZFT4EI+ZHUMnRF7M2rz/vjRBG2z+0r7rOx3f/NhV 1s7erFwy9VasDdfJxndioQEUqrUhIVZsIP7rcn+AuL9F8svS4ClWs9nxnTY7NRE5XGK6 oG9g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@arndb.de header.s=fm3 header.b=d1gMyEQx; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b="CYUGZ/nj"; arc=pass (i=1 spf=pass spfdomain=arndb.de dkim=pass dkdomain=arndb.de dkim=pass dkdomain=messagingengine.com dmarc=pass fromdomain=arndb.de); spf=pass (google.com: domain of linux-kernel+bounces-68695-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68695-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arndb.de Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id u137-20020a63798f000000b005dc80c3271esi3151158pgc.55.2024.02.16.06.07.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 06:07:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-68695-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@arndb.de header.s=fm3 header.b=d1gMyEQx; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b="CYUGZ/nj"; arc=pass (i=1 spf=pass spfdomain=arndb.de dkim=pass dkdomain=arndb.de dkim=pass dkdomain=messagingengine.com dmarc=pass fromdomain=arndb.de); spf=pass (google.com: domain of linux-kernel+bounces-68695-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68695-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arndb.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 7AB3D2818DC for ; Fri, 16 Feb 2024 14:04:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BD3B712A17B; Fri, 16 Feb 2024 14:04:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=arndb.de header.i=@arndb.de header.b="d1gMyEQx"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="CYUGZ/nj" Received: from fout8-smtp.messagingengine.com (fout8-smtp.messagingengine.com [103.168.172.151]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6494D12C54A; Fri, 16 Feb 2024 14:04:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.151 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708092279; cv=none; b=TjM5R6ukrR2xLfn+GMKbNzalRAUXqSBA/Ud7bRrzurTuKSVR/ZOp9NjgHqXaVEEOshZ1ye5dnQAXiAuA+rZgqpNF6AIkroYojE5Wn37GhiOLzmuJqEKA38cRZnhyZptlmAllOlAuHvQY3MueYlfheFB2xx783h5IdsUsPkJI4zc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708092279; c=relaxed/simple; bh=JKmsLs59jO5nqdFavx3u4/IOXJSpBQJ3cSSgM+LlTx0=; h=MIME-Version:Message-Id:In-Reply-To:References:Date:From:To:Cc: Subject:Content-Type; b=qxLrwPPpXFpqdRPcTpPO4DTV4Xlnar94rCFRtH9sQS0fpxk1dg1SB75Rf5lvSlYGAGbMBi/PwhQtM0NyhY/KP2z5h40cxpAvC6JDQ8N/xw0NfFeeXTKYAHO2Xw4XvpJLsYx7HBNgM/8UA6/7WpwcVFqNIysK/Tcf9iN+YIVXgS8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arndb.de; spf=pass smtp.mailfrom=arndb.de; dkim=pass (2048-bit key) header.d=arndb.de header.i=@arndb.de header.b=d1gMyEQx; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=CYUGZ/nj; arc=none smtp.client-ip=103.168.172.151 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arndb.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arndb.de Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailfout.nyi.internal (Postfix) with ESMTP id 1C7CC13800CB; Fri, 16 Feb 2024 09:04:36 -0500 (EST) Received: from imap51 ([10.202.2.101]) by compute5.internal (MEProxy); Fri, 16 Feb 2024 09:04:36 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1708092276; x=1708178676; bh=xFinwvZsrlvUGjNZQPKThE+p8vedvK1faZDi1/Ymc0w=; b= d1gMyEQxtRotjYkrw8mdHJ8KXrjzwEl/mdKBBRxPEUcUHwccIXLQH9Z26S5jaIOJ r8TFhJrjXEGR0469jU44PG+bKttR1gJ+kS9Gu7gL8nDdUcdYR7RP/iCXf3B2zoyd 7uFgp4MdeG/rT6sBXCgAL5XtzfCtKQ2gr9RaZj2lw5nlqAnJAGUMYJTPSxqbQXjS bvNR1eGuWLQCxUDVzLNEFDjF+Db2tfB0RY6J6XFPskHKxJfXm7fS/fbNeiarYtaq vRU1Xg6Mu6OvK4m8p6HTAlkSQjxasDGoYYvBOJHZP96KvJhUoPAEiSVKF8QVujCS u6QpsRV2b1N4S3M0q6SBxw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1708092276; x= 1708178676; bh=xFinwvZsrlvUGjNZQPKThE+p8vedvK1faZDi1/Ymc0w=; b=C YUGZ/njD8YfSpEDvhvTXVQ9OorBdHGWJa+FVOTRsh/D+vls5IyyQWdy/A0TD3oUV Xd4MIjnYzJ0v/NHNjLZja+vvlDV/GC+B30xJoNJmfjTOwJG4vy+KHchuanIU75gJ zvBhLjsJYPKYsFodxfl1dW5nqwWmg8OZCsmnPR8UPVfKm+BNtSp5X59jrQ1I83TE bL+GRJLYVqe5pZDFl/z8DQUqHRwbYlKYE78KrEzACzaxEi0gYEP71ttWlDmvQd6v 7e6VHB8v24dpaf6oYgd5P3tl/7Kh+PCq9pxzJh/U/RdhhrgIpGxf8fpritAtR+qb 1cxkxnLKhzV7d0cVPFguw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvddvgdeitdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvvefutgfgsehtqhertderreejnecuhfhrohhmpedftehr nhguuceuvghrghhmrghnnhdfuceorghrnhgusegrrhhnuggsrdguvgeqnecuggftrfgrth htvghrnhepgeefjeehvdelvdffieejieejiedvvdfhleeivdelveehjeelteegudektdfg jeevnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprg hrnhgusegrrhhnuggsrdguvg X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 16E8AB60093; Fri, 16 Feb 2024 09:04:35 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.11.0-alpha0-144-ge5821d614e-fm-20240125.002-ge5821d61 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <14ab7b63-b2c0-41e3-8104-da5515b379be@app.fastmail.com> In-Reply-To: References: <20240216125959.3766309-1-arnd@kernel.org> Date: Fri, 16 Feb 2024 15:04:14 +0100 From: "Arnd Bergmann" To: "Bartosz Golaszewski" , "Arnd Bergmann" Cc: "Linus Walleij" , "Paul E. McKenney" , "Kent Gibson" , "Andy Shevchenko" , "open list:GPIO SUBSYSTEM" , linux-kernel@vger.kernel.org Subject: Re: [PATCH] gpio: cdev: avoid uninitialized variable dereference Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable On Fri, Feb 16, 2024, at 14:19, Bartosz Golaszewski wrote: > On Fri, Feb 16, 2024 at 2:00=E2=80=AFPM Arnd Bergmann wrote: >> >> From: Arnd Bergmann >> >> The 'gc' variable is never set before it gets printed: >> >> drivers/gpio/gpiolib-cdev.c:2802:11: error: variable 'gc' is uninitia= lized when used here [-Werror,-Wuninitialized] >> 2802 | chip_dbg(gc, "added GPIO chardev (%d:%d)\n", MAJOR(de= vt), gdev->id); >> | ^~ >> drivers/gpio/gpiolib.h:277:11: note: expanded from macro 'chip_dbg' >> 277 | dev_dbg(&gc->gpiodev->dev, "(%s): " fmt, gc->label, #= #__VA_ARGS__) >> | ^~ >> >> Use dev_dbg() directly. >> >> Fixes: 8574b5b47610 ("gpio: cdev: use correct pointer accessors with = SRCU") >> Signed-off-by: Arnd Bergmann >> --- > > I seem to have beat you to it[1] and my patch doesn't change the log > message so I'll apply it instead of this one. Ok, thanks. I thought about doing this, but could not figure out which of the RCU primitives to use. Arnd