From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A52DF25D1F5 for ; Fri, 28 Feb 2025 11:37:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.49 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740742655; cv=none; b=A1OvClWkFRjhwFgu49WaYseNaqNGuCi6BaFxZwcFzuFk+3SUVUSeFvL3+/JwyNW8hE2YQcVlIkB9ZVavCmpopnICSMS4VDpe+HVgxULP1/QO8TrY2lqlXmRL7cCSoPRgTFqe5Zcnu5BS0J3OXcnAytSO5p3tWkDGxcNfqG1/nd8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740742655; c=relaxed/simple; bh=4WphRhmBskEe1O7l/TMn/svQYxnNymiR11yGWly6ZMM=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=bEHy8ffjexeb8eqe8pyXWHti/KaMZ9edqwyfgX0HDpZitaLyvu0e9a/9ZZySieLhPda3/zVHyOWMuILi455KfoONhN74DJsuWDPPh7gs6sYztTB/uSSudkuT/x/sdsc0RC0l2Y4rx8LPhG/fdOM+G8awp4HMLg5C+UWTySfXSXA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=tBpIfaFz; arc=none smtp.client-ip=209.85.128.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="tBpIfaFz" Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-439946a49e1so12890595e9.0 for ; Fri, 28 Feb 2025 03:37:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1740742652; x=1741347452; darn=vger.kernel.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=c/hLcQeQYuvt7E85+DEnVuGUhxPnEJoXJywDNJlyKbY=; b=tBpIfaFzaVmaa5dwaNhMVYXeKYuDf7UFytIFGBW8nkpK4WR4CedTBHyMkhyJ+i9NYt QD8scUSA4ANlJZTz9YZJD97Fal/qElbhx0BAFml571t+6fgJm/LtC/iLUaM7mhg4IXEe XMnftJpK3xsRszjUFg2ke5SvYXfsa7Gr5Nsjs/u6nFoH4A8wQNK2Dg4/+N7qjiaAGjIM 9DasUd2rsk/V0oLvNNvWpOe8gz5jn+eXL0scLLeUIUJOFayLl9B6g8dnluB511rHhMn1 KGe+4gr95gJo+Jv2R2kFi7tlIgZQ5tXnYFkivqJ9rSWZgzk6rB3BDB2kdQj2K43NdkVK 1Bnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740742652; x=1741347452; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=c/hLcQeQYuvt7E85+DEnVuGUhxPnEJoXJywDNJlyKbY=; b=wyrXsshzKTbsdXpMNtGRIGVZVazuFK78Y/iGF7cRmeqIODfeDGo22wC9wHBKhACC7Q OyKR/UYyj5p4v2aT8DS44v1yE+K8DJNr/f/odrbaZql7UBaLFrSCGKkaYWlZNUBlSQW7 gNe02dGJe5IoekzaN4CYage67WPHShj1yFw30wr92TB3taVi0Y4i8L6Y/b7ppbwEw4G9 LMCVbcLQKfTyJoUANbBfEab0nu7qNOp4tYrfZanXqWmlCDkc99p+505D0J2SBpe9MV4A QUDhWk7nWVi2q0UCrbFjT6lCWJXzumhsoS9+Z3ydHYRKnMAb877Rv1e5zpeFmWjVUlrR 4eeg== X-Forwarded-Encrypted: i=1; AJvYcCXJtWJH9ffG3wpdT35e6smqeOo+GWABs4IG5t2SgzsUuNg0upZWGXsMEwKYQrBe7+4Na30vtQdMmdUJyT8=@vger.kernel.org X-Gm-Message-State: AOJu0YzL4qeHEVRC0OORTKIH0m/1mt4sRBR8zArl0DjOM5bprA90Ls05 jKLPyOP24VX/Fz+ENBUHNfO8oQZNqE/vIAELBHOQrVhqXLMCKrXMRErB5cQH9Gs= X-Gm-Gg: ASbGnct07gdB18m2mVTJJuYKM+JSA7ckEbVydXczvms0KCy7zblVFDen5bCJ1LxpXvb eNnS8saWP5c9CxNiPPuSMUWHzpICft+lTxWx1VTkk00J9fusT4WVuAZdVr8lLNGVsNs7k0ztsx+ fiySpYyEyNnK3SihQi2v7L0mhhHErZEnFGB6mJnuNUkhoAET/7q73hjTJ3Fh6w2/k1Dehv02Xwc q5LHZuXmocWhcnfqxxwTQEtL1sTx9UF2GFyyRsJXD32CPB4ss30cMmQ53u3z7IaEIPqcjkEKHVz OkbMy4KqPFE8zZZS5DTY2u2BnhF3VQ== X-Google-Smtp-Source: AGHT+IHzUCNP7VmFKJ2Rw0oWiCLeL/Benysg+yxlWGkjt2D4Yc4YzpTklR4JnbSyxhhE1CRgClygig== X-Received: by 2002:a5d:64cf:0:b0:38f:483f:8319 with SMTP id ffacd0b85a97d-390eca53bd4mr2309089f8f.51.1740742651971; Fri, 28 Feb 2025 03:37:31 -0800 (PST) Received: from draszik.lan ([80.111.64.44]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-390e485db82sm4831015f8f.88.2025.02.28.03.37.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Feb 2025 03:37:31 -0800 (PST) Message-ID: Subject: Re: [PATCH v2 5/6] gpio: max77759: add Maxim MAX77759 gpio driver From: =?ISO-8859-1?Q?Andr=E9?= Draszik To: Linus Walleij Cc: Lee Jones , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bartosz Golaszewski , Srinivas Kandagatla , Kees Cook , "Gustavo A. R. Silva" , Peter Griffin , Tudor Ambarus , Will McVicker , kernel-team@android.com, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-gpio@vger.kernel.org, linux-hardening@vger.kernel.org Date: Fri, 28 Feb 2025 11:37:30 +0000 In-Reply-To: References: <20250226-max77759-mfd-v2-0-a65ebe2bc0a9@linaro.org> <20250226-max77759-mfd-v2-5-a65ebe2bc0a9@linaro.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.53.2-1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 On Fri, 2025-02-28 at 10:58 +0000, Andr=C3=A9 Draszik wrote: > Hi Linus, >=20 > Thanks for you review! >=20 > On Fri, 2025-02-28 at 08:10 +0100, Linus Walleij wrote: > > Hi Andr=C3=A9, > >=20 > > thanks for your patch! > >=20 > > mostly looks fine, given the MFD design is accepted. > > Nitpicks below: > >=20 > > On Wed, Feb 26, 2025 at 6:51=E2=80=AFPM Andr=C3=A9 Draszik wrote: > >=20 > > > +static irqreturn_t max77759_gpio_irqhandler(int irq, void *data) > > > +{ > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 int handled =3D 0; > >=20 > > bool handled =3D false; > >=20 > > (...) > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 for_each_set_bit(offset, &pending, MAX77759_N_GPIOS) { > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 unsigned= int virq; > >=20 > > I usually just call this "irq", as it's not any more virtual than any o= ther > > Linux magic number, and it can confuse people working with > > actual virtualization when we call things virtual like this. >=20 > Calling it 'irq' would shadow the first argument of this irq > handler function, which is also and usually called irq and which > I'd like to avoid shadowing. >=20 > Are you OK with 'subirq'? Or any other preference? Actually, there's no real need for that variable, I'll just drop it altogether: handle_nested_irq(irq_find_mapping(gc->irq.domain, offset)); A.