From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f176.google.com (mail-pf1-f176.google.com [209.85.210.176]) (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 028E32D94A0 for ; Wed, 13 May 2026 20:44:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.176 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778705053; cv=none; b=Q7CCtOZeqMd6g0c29cDPkGNRaoJPM79mf6fkuc18czX2FRXW+t9pGt38GxV+OxFiWN5IyeI/9P+2arC+BbvP/EEm4JeN0pHWekOMdQq/hgiEIM1oZhi4Q4ZNTIp+yi71iaU2j9Q7URWsYoxnWzWdHrvOXPuGcFkBNdM9cZ9mGcg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778705053; c=relaxed/simple; bh=utb8PxUAQ21IQGDkeCLP3Nrl6lFjdmkAk949vvRVAE0=; h=Mime-Version:Content-Type:Date:Message-Id:Subject:Cc:To:From: References:In-Reply-To; b=EHEoqNxbET1pkIKOw9CqgRkzfHWd6InhrXy6xzDr5ECeXcyRnwHdNhz28Uqalg+vCI3c2GftkhVzEux2FiLnknbb8x8apSoTGdD3VsC42pYPWg43p50Mbg1tBpXiTvqsxQIZuWro101CZ2Trhf3mXGDj4gPsP2KfEybs9dWAIpc= 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=INiy8UQR; arc=none smtp.client-ip=209.85.210.176 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="INiy8UQR" Received: by mail-pf1-f176.google.com with SMTP id d2e1a72fcca58-836ed29d1e5so3268360b3a.2 for ; Wed, 13 May 2026 13:44:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1778705051; x=1779309851; darn=vger.kernel.org; h=in-reply-to:references:from:to:cc:subject:message-id:date :content-transfer-encoding:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=MCVwevTrbyLjyeQl3sspspHpkcp4yNudK5glbIfDxdM=; b=INiy8UQR1f7J//L6PbQVdxQ2uRzGWCLC4OUrT4s3RUjn2KfCyClCwJUmSc4keTpxKw TiD4t7tfGBnasffm3habMD1fHcU/56v+mVGvEptA38HhCsWze0mVRGHn3YEYZlZ+mlXD tdznfWuMNSJBtfxC94RQvmGhNK6H2nzeyeyl6vEwDQh36PDf53G2nKv+KDCY42gStcR0 djXzysVCxTn76Wn6Hkoy+UFpl4hBd4dmkdrQfLaByvACwx5xYD73mbdDubrvEtBhmIU6 rFr8RtKIq6cU7b3/IVWao7iKc2n1Tpw+iBN9UHqODinwLYBxdutQ7iCfGhZe/U6Ka5+n ic2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778705051; x=1779309851; h=in-reply-to:references:from:to:cc:subject:message-id:date :content-transfer-encoding:mime-version:x-gm-gg:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=MCVwevTrbyLjyeQl3sspspHpkcp4yNudK5glbIfDxdM=; b=fOhne8WN0pWRJXwWWAjZlIE8hdVEFdaxvXAm96/3DxUfc+ymFZs5dT4cSmxNBFt5ff hP0sTZDHvBckYPkWCq7g/3LkIlHM3AzLYcDG6hgzvUV5ULdfqLy/JJ7Gh9lMECKUO9bY QdKuzE9OK8t0l6ERM5MuUVzOdPz2GI9V4qGvI4yPt8t0wTt9HB3EIqRCW14LJ7/uisZl WLJT1/utK6lx4g5VwNyLs3xjUiUyPzJV0fXiGYwDtUjo8mXka9N4pnSJH2QQif6coYqY 7gKyCIe2kMEBVPFQfkyyNYTlX41STwe1uyYe4Z4GLONLQ/rCMNxxXc+ujyhi7qzkBzgA I1hw== X-Forwarded-Encrypted: i=1; AFNElJ9maic+c+FmXqW21wmYhdeKHHavC5aAlEAJjPpGmTpNBsxhLy99f5E6e1THhb8wyeDNBU7CCha4lGiSm9c=@vger.kernel.org X-Gm-Message-State: AOJu0YwoOyVe7mPkInKSyJUzrWixoleUQ0Ii59tG7j0vZE0ve82/slvN N/lGOAee/7zlIPN0w13IUmL00fbQYrVsM12+ppV/LpPIL8zrsbIysvjv X-Gm-Gg: Acq92OG+lQcYaNX5+iiOJoJZ7wYgtcF7jXFweqTeFYE0L8skcC2wL2yMpdqnRsdyCbN xjsImTATHensroXDy5g8UvPpdLlmu22WBIpbbpKLARmH18NjHciRGfVPt2dzPqW7h3pScvuZ0tJ omJ/kq2j1A/khfXBRhrqaA3e3ujb+hiyDIXK6FA4a0UMqPhkndsvO6//1xDaxoQCno6F3qAvXA9 5VTsjnEE080XSdgUxSL3p3FSSRsfS82AR3RS6+PPYqe+aprxKGwLCjKN4mBTbjngQk27tdFZ3RT Nt9+Dc9I8QCMGfFbcvR8ib0YOkPfufRsSHvvldfkNuUTxA7qxaai2djExXH8VcLaeGAQfYuJXS+ GrVuUDs0iOoq903R5Nl8K3+7g3SEHL4WnAhA9TjUcY6rZ76l0/iZRweGBlOWzkKeG5fXZa6SDnL nyiSLCAHAni1kFI1Xbbi95abKbhBUerexM5g== X-Received: by 2002:a05:6a20:9188:b0:3a2:d79c:4159 with SMTP id adf61e73a8af0-3af82786dd4mr5739325637.32.1778705051152; Wed, 13 May 2026 13:44:11 -0700 (PDT) Received: from localhost ([203.99.159.227]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-83f196660f9sm485790b3a.10.2026.05.13.13.44.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 13 May 2026 13:44:10 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Thu, 14 May 2026 09:44:00 +1300 Message-Id: Subject: Re: [PATCH v2 2/4] iio: light: veml6030: fix channel type when pushing events Cc: "Jonathan Cameron" , "Lars-Peter Clausen" , "Rob Herring" , "Krzysztof Kozlowski" , "Conor Dooley" , "Rishi Gupta" , "David Lechner" , =?utf-8?q?Nuno_S=C3=A1?= , "Andy Shevchenko" , "Matti Vaittinen" , , , To: "Andy Shevchenko" From: "Javier Carrasco" X-Mailer: aerc 0.20.1-4-g02324e9d9cab References: <20260513-veml6031x00-v2-0-4703ca661a1d@gmail.com> <20260513-veml6031x00-v2-2-4703ca661a1d@gmail.com> In-Reply-To: On Thu May 14, 2026 at 9:02 AM +13, Andy Shevchenko wrote: > On Thu, May 14, 2026 at 07:13:41AM +1300, Javier Carrasco wrote: >> On Thu May 14, 2026 at 6:48 AM +13, Andy Shevchenko wrote: >> > On Wed, May 13, 2026 at 05:49:42PM +1300, Javier Carrasco wrote: >> >> The events are registered for IIO_LIGHT and not for IIO_INTENSITY. >> >> Use the correct channel type. >> > >> >> This bug was introduced in the first version of the driver. >> > >> > Unneeded detail, if it's a bug, use Fixes tag. >> >> >> When at it, fix minor checkpatch code style warning (alignment). > > ... > >> >> - iio_push_event(indio_dev, IIO_UNMOD_EVENT_CODE(IIO_INTENSITY, >> >> - 0, IIO_EV_TYPE_THRESH, evtdir), >> >> - iio_get_time_ns(indio_dev)); >> >> + iio_push_event(indio_dev, IIO_UNMOD_EVENT_CODE(IIO_LIGHT, >> >> + 0, >> >> + IIO_EV_TYPE_THRESH, >> >> + evtdir), >> >> + iio_get_time_ns(indio_dev)); >> > >> > AFAICS the indentation is still broken. Why not doing like this: >> > >> > iio_push_event(indio_dev, >> > IIO_UNMOD_EVENT_CODE(IIO_LIGHT, 0, IIO_EV_TYPE_THRESH, evtdir= ), >> > iio_get_time_ns(indio_dev)); >> >> Thank you for your feedback. According to checkpatch.pl, both variants >> are fine. Mine takes into account the indentation within >> IIO_UNMOD_EVENT_CODE(), > > And still have broken indentation with the last parameter. So it's not fi= ne. > I am sorry to insist on this, but I beg to differ. The last paramter (iio_get_time_ns()) is properly aligned as an argument of iio_push_event() and not IIO_UNMOD_EVENT_CODE(). That is exactly my point: with my indentation it is clear that iio_get_time_ns() is an argument of iio_push_event() and not IIO_UNMOD_EVENT_CODE() because of the alignment. Moreove, my proposed alignment (which again, is fine with checkpatch --strict and the original one for example wasn't) is consistent with many usages of iio_push_event() in existing drivers. I just checked that there are dozens like mine, being the majority when it comes to this kind of indentation. >> and yours only accounts for the indentation for >> the arguments of iio_push_event(). Moreover, your suggestion goes beyond >> 80 characters and mine does not, > > When it's about readability the 80 characters is not a strict limit. > >> so I would prefer sticking to mine if >> possible. > > I recommend to reconsider. Mine has no indentation issues, the only subtl= e > "problem" is 86 character line. And looking at the result I find mine bet= ter > to read (hence the exception may apply and we are fine with the length of > the line). > >> As I said, it passes checkpatch --strict without warnings >> in both cases. > >> I will send a new version adding the Fixes tag and removing the comment. > > Make it the first patch as the currently first one does not sound like a = fix > to me. Ok, I will make this one the first patch of a smaller series with the right Fixes tag added to it and removed from the other patch that affects veml6030. I will split the new driver in smaller chunks and send it as a dedicated series but continuing with the current versioning. Best regards, Javier