From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) (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 9954E3A3809 for ; Thu, 30 Jul 2026 07:19:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785395966; cv=none; b=q0aiCdRrygZ0dPV+EDKybZH9JDtaP/T5XBqFgoNm/2hZlVMEKsQb1KXUNGydPRR3zdwHapc0vDnxlv3arUfrm+ZgLziYL4yqg5rK2e9Xvtvt8foMS8+WImMOX7sLAoCZt5TfRfbwaL/Jzn/nc8UbED6ZUJTBrAC65IvA89oO9xw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785395966; c=relaxed/simple; bh=o92yQvxUqaTH9jym+90EcVtlkrdRh9f0R3gdaJcI2yY=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=HCvr7IhILMAfiTMM8qHvIHuuVsEINhnTWe80A2/npJHvkY4PtNjH6jpjcqQhBVeOCjurSgD0cEM2BiF5N26dbRcktgAATaJ1jTgFLl4gLiq+bMkItOgc3DhxRfp8ALQSw8e7dxIL4mAm3PfEkT+h/dqN8CosP5/hdXj7uQBz6Ao= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=TDZvIC0b; arc=none smtp.client-ip=209.85.128.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="TDZvIC0b" Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-493b966dd74so10566865e9.3 for ; Thu, 30 Jul 2026 00:19:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1785395963; x=1786000763; darn=vger.kernel.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=2y5QAVeNEbw4rwpIis7dsdZArac2vQn3qNAs9Ae58oc=; b=TDZvIC0bfDa4fCzOf7s2pZOBbLaDjH1d8WTo2EM2K6gTfySeO1XAo3bl8wG+S3aLCK +D6oJyzgcXIAG5XuRCIF9t151BQ5OEnnA8/unICrufrKxzRf4/675C/yRahW2IilUwTW SJ+RvV1TjEuUsiATomvXsM381YjyAK927SHPvI6zwrcS+ObWeypRcrv3eDT7glKB7xsk nzJTjktJ1LQWRtvfOgreT2d8sR8GQ6lo7WcQTvh8hqc8edtX1JQEyYaCGZ61QKRx1/99 ajHZMP14tW1INTJgOeYjF2ua8wroOZF/iML5o6Pf0LfOXmhfLLcE3Jcwy4HfEILv+yXp raKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785395963; x=1786000763; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=2y5QAVeNEbw4rwpIis7dsdZArac2vQn3qNAs9Ae58oc=; b=rjx+4c0fKnBYga+7tkRL/FMk/6vovjtejlMXKtJqeU8gRT3DmvaLh1JpHrb6Cr+Zhk bam5YCiJocK9Xg3kRO1Fro2QVo3YOT49ynSBD/EBvhY8eecF6icUG2O6wP/9zmUR8qwy j50NoaEcWnZX782P0uoQr33/qg9WV/tFmaN06utFb2JHAxU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Qyt+MEm93fMamiIj iZU9JeF0Beqz5s7BYIsaRTfiE06baRDiDFEwLaYxzwdp2S59h/3QByrNvfK+eficg+dsU/TJ9 X-Received: by 2002:a05:600c:3306:b0:493:b6ee:fcb7 with SMTP id 5b1f17b1804b1-49800e753admr10529425e9.14.1785395962626; Thu, 30 Jul 2026 00:19:22 -0700 (PDT) Received: from localhost (90-182-112-124.rcp.o2.cz. [90.182.112.124]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-47fc88d6e68sm3625182f8f.7.2026.07.30.00.19.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Jul 2026 00:19:22 -0700 (PDT) Date: Thu, 30 Jul 2026 09:19:21 +0200 From: Joshua Crofts To: "Kaustabh Chakraborty" Cc: "Jonathan Cameron" , "David Lechner" , Nuno =?ISO-8859-1?Q?S=E1?= , "Andy Shevchenko" , "Rob Herring" , "Krzysztof Kozlowski" , "Conor Dooley" , "Peter Griffin" , "Alim Akhtar" , , , , , Subject: Re: [PATCH 2/3] iio: proximity: add driver for Sharp GP2AP070S proximity sensor Message-ID: <20260730091921.00002d45@gmail.com> In-Reply-To: References: <20260723-gp2ap070s-v1-0-b8ca3a4c10dd@disroot.org> <20260723-gp2ap070s-v1-2-b8ca3a4c10dd@disroot.org> <20260723234439.06411731@systembl0wer> X-Mailer: Claws Mail 4.4.0 (GTK 3.24.51; x86_64-w64-mingw32) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Wed, 29 Jul 2026 23:23:45 +0530 "Kaustabh Chakraborty" wrote: ... > > Please add iio/* includes after the generic linux/* headers. Ensure > > that there is a blank line between the two groups. > > > > Additionally, you're also missing , array_size.h, err.h, > > types.h and delay.h. > > By the way, is there any tooling to satisfactorily point out the > shortfalls with includes? Or is it just intuition and experience? "Fully satisfactorily" no, but there is a tool called iwyu_tool (IWYU meaning include-what-you-use). It requires Clang/LLVM on your machine but it can serve as a pretty good starting point when cleaning up includes. There is an unofficial mapping file for IIO that makes the output of the tool less noisy, however it will probably still need tweaking. Here's the link to that thread: https://lore.kernel.org/linux-iio/20260512073505.1310-1-joshua.crofts1@gmail.com/ Setting it up may be a bit tedious, but I found Gemini to be pretty good at this. > > >> + ret = devm_request_threaded_irq(dev, client->irq, NULL, > >> + gp2ap070s_irq_handler, IRQF_ONESHOT, > >> + "gp2ap070s-irq", indio_dev); > >> + if (ret) > >> + return dev_err_probe(dev, ret, "Failed to request IRQ"); > > > > Just return ret instead, dev_err_probe() is called automatically on failure. > > Are you sure about that? I happen to call dev_err_probe() on all other > places and other drivers (as of late) as well (other than -ENOMEM). See the comment at the devm_request_threaded_irq definition here: https://elixir.bootlin.com/linux/v7.2-rc4/source/kernel/irq/devres.c#L94 -- Kind regards, Joshua Crofts