From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-yw1-f171.google.com (mail-yw1-f171.google.com [209.85.128.171]) (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 70A80BA21 for ; Mon, 23 Feb 2026 03:40:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771818043; cv=none; b=X9DmMW/ft5BGrovWM0Mv7KP67rOWgJFMXZ72v+5JDRZNj7dwcpIYrvEw6fn8POcc7z4zyEJArujWuwphidaKN7gy4PBWeY1Zm7v1Wa/EL1+obaXJMrxxjp58tLQurPydfFREFxzujAq2LX21Sec55ZZBpRHgbaUn9zEQfCw877I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771818043; c=relaxed/simple; bh=r1RFYdYS++vKOcG/gTUlViHkxEH0WN8JQoXCOqssjtw=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=uhMsLxFmSYbgEghqId/ltj5OHvfHzNfy988hhdDQfCnopST5sYztnGeZFmh1xjJVkQrApDc6E8ozSDDgWrF4LEKLRgbYubIGBwpcRwqRHsNYpQhTjiusFO99XqkihLM9dDCGuRmOlqxwESYK34UC+F0VEPSna+7dnXt45P97OMM= 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=NCzrpI9O; arc=none smtp.client-ip=209.85.128.171 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="NCzrpI9O" Received: by mail-yw1-f171.google.com with SMTP id 00721157ae682-7947cf097c1so34070327b3.2 for ; Sun, 22 Feb 2026 19:40:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1771818039; x=1772422839; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=DjV8snXmEBl8xVUnnm+j5Z5gtM4aqM+pzeTnsQY4+BQ=; b=NCzrpI9OSWLMkFRII1JeTiO1u/GlUsi40y2yAoSgiodAHUdueMC6+z/GPMe/uOqj3V nnbHKrdW5rLcrJtFaoayN5NWjQ2KUaZj3QUVpwbzBspstlBEtMOUF+cIkK1/ygTQ5Oef 0s5wOY4cc15jbJ6/uvpDKQIhVjQHKPsNvS7G4hn2LQh5NiY2smIKYMcxro7oCEKHmAjL jAiTobeHt2nJ49aY4FvR2Cgg6o0hCJtbKgd1pQwYzpXU6rk/0xXfOiUqNQmdr4mlHaHD 81ti1/8N0XX7zKBxQ5QQ0QjD+KRAq9NZtTTrmCHkgmg49adisfgLtlfDR8WRCgy6GdQ9 xGjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771818039; x=1772422839; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=DjV8snXmEBl8xVUnnm+j5Z5gtM4aqM+pzeTnsQY4+BQ=; b=O4lDnF4SRM+rYbVMVTE5sl1tBjTJ33+Mo9+2Z6i3KBSBSH1BvLtOrJuBNdorw2w8PV Q2qMfQy7DGQk0qETbatJOieMCdHuMiod760b3bBiOBzDJ++xi8AkvokHUPAbN2pwM1YH NfIFAbPQ9kEzw3WGaqdp5rtg7+YuidbcfUJ+XtCb1XHFQSxHCh9fYPWi7AoDTwo0Q3gG 5pnIhofr6lC9aNmEZYEv9Ej2L34qlPheZDLkq+IfjIFGuOSSxeu6gUqK00Ut8MMe4Pki tk1RcApB9+C85FfmRfylGL3oDoOSXGPgP3mRy6j/zaw2tB1Os3Ls9y6W77Gtj3U9biLs a7SA== X-Forwarded-Encrypted: i=1; AJvYcCUytF7e9zfNL1tPudxkXiHRdEjTC7IQqxvBNS4iHhu3Jg6BHD4rhuAcCMbPZuslKfQABbons4d4znlVqu4=@vger.kernel.org X-Gm-Message-State: AOJu0Yx/HLPBk/4hsi9UzWtqXxb1ehrec3NcOrepqzlkdgRLLx4RGuwT BEXp0IJVf/HoiodvMhDKdi4MtlDschBOWQ6Xwtd4kGrANK51GHqk50S7 X-Gm-Gg: ATEYQzyM+xhyMH5lBSV0j6tYjMu2nZMM+2IvvGoypCCaid0Jk1IcaP4V80i8PyMpBNg VTdsetk7PUE4QXW29nL/2w5hHNr78tbbnnprfqz8CAmg/kRdmxD2IPlZl07tzjISedLWbO1zRGV 8UphhLHlGvTy+XcO2+fOY2gxd7J+s2ppzIfJk5tGZ1SXLi+LQvbsOyqBn/jnkkkzFvflcvBpuEa Xui9Rqm9tbyf8ad0Sf8/9aCPhTgyfPYLgBlx0njeCmJlt3KfI84ckFfMp1VfHQHRHTQfsrVldmb FmIX22OdHv44mw5HWgEDofwJEOrFzhejNwbF84x0yivmXVBzRpihb+IRCcytlkFAZo6sqUMuDdH YyO8rV+4AuzweR0jwSk9GsEgERaMBV26jbZSH9iTQNib/F1A0JS0HAPFIsr0aKO8AIb1+nvd8ZR eESHEchK8FHwaWglqPsahvhhUK5X9sIkcHRMIMUpwjAnCSpsMnZSOspruEDfkeebFakz76GUBxK GloI/XLlwtqCNuef8vH8HXd X-Received: by 2002:a05:690c:ec7:b0:796:360f:e1a9 with SMTP id 00721157ae682-79828f4074cmr70198487b3.29.1771818039393; Sun, 22 Feb 2026 19:40:39 -0800 (PST) Received: from tux ([2601:7c0:c37c:4c00::5c0b]) by smtp.gmail.com with ESMTPSA id 00721157ae682-7982dbd5939sm27285237b3.15.2026.02.22.19.40.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Feb 2026 19:40:39 -0800 (PST) From: Ethan Tidmore To: Jonathan Cameron , Andy Shevchenko Cc: David Lechner , =?UTF-8?q?Nuno=20S=C3=A1?= , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, Ethan Tidmore Subject: [PATCH v5 00/10] General clean up and bug fixes Date: Sun, 22 Feb 2026 21:40:10 -0600 Message-ID: <20260223034020.27625-1-ethantidmore06@gmail.com> X-Mailer: git-send-email 2.53.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit This series performs a general cleanup of the gp2ap020a00f IIO driver. It integrates my original work switching to the guard() cleanup handler, fixing a signedness warning from Smatch, an error swallow bug originally spotted by Andy Shevchenko which I expanded to cover both buffer setup functions and general cleanups written by Andy Shevchenko [1]. v5: - Patch 1: Integrate some of Andy Shevchenko's changes. - Patch 4: Split patch up as requested by Andy Shevchenko. - Patch 5: Split this patch from the patch number 4, to keep bug fix separate from style fix. v4: - Integrated Andy Shevchenko's 7-patch cleanup series. - Patch 1: Removed redundant 'err' variable and whitespace issues as suggested by Andy. - Patch 2: Added Reviewed-by tag from Andy Shevchenko. - Patch 5: Updated commit message to describe the pre-existing bug fix in gp2ap020a00f_buffer_predisable() where errors could be swallowed. v3: - Addressed initial feedback and simplified locking logic. [1] https://lore.kernel.org/all/20260217102318.1354103-1-andriy.shevchenko@linux.intel.com/ Andy Shevchenko (7): iio: light: gp2ap020a00f: Use correct types for 16-bit LE data iio: light: gp2ap020a00f: Return directly from the switch cases iio: light: gp2ap020a00f: Replace custom implementation of min() iio: light: gp2ap020a00f: Use temporary variable for struct device iio: light: gp2ap020a00f: Explicitly use string literal for driver name iio: light: gp2ap020a00f: Remove trailing comma in termination entry iio: light: gp2ap020a00f: Join some lines of code to be a single line Ethan Tidmore (3): iio: light: gp2ap020a00f: simplify locking with guard() iio: light: gp2ap020a00f: correct return type to int iio: light: gp2ap020a00f: Fix possible error swallow drivers/iio/light/gp2ap020a00f.c | 303 ++++++++++++------------------- 1 file changed, 117 insertions(+), 186 deletions(-) -- 2.53.0