From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.82.46 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796058289; b=lqSANhOnnv8JEXbsp0Ixkv/zoSoU4imgHjyIa+FmyyH8TprJ+tPXJaGyL2EKOcKa2Y0s RkglOg9WY7ZOP74uqLAv4ecV/V9L9jiq7Xhl4jwqoqA82GV/EvnDXVioCdRnNLFyzTeMy 3cguOvKDN93BO/QT41+A+fo0zd1yOvaywSScm/8k1k8SFUl/rHcNR8CdzPSTc6fAK1QTd 0f+gijuebSkAbbnRZxP0Os9YcB7ed/Mbey0WPYYBKRA19humVOsaQm7zievBH4N5hhcVU cXwKGd3Wmt16Ga7/j2sHFQzdsL7WB6T/01PTIKZlGqYlk7FFY4QQsW0kbzwJI32QczQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796058289; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: Date:From:To:CC:Subject:User-Agent:In-Reply-To:References:Message-ID: MIME-Version:Content-Type:Content-Transfer-Encoding; bh=I8rUrF9gEwP6gmxpTjJFTxsTZcZ6uE+aXe52kra5xNs=; b=AK1p4Fr/Sld88BhtqMgC3Z5BEO1KlUlUQwQTgbB50ockOTwqUiL6YHf4DzxVtJp7PYfI Lgf9FgyiI2zRnF1CdTKc302cAUWn7WJLn+31cO7piVSkLLCdRHzHHiSdaMYCdFwp7ikh3 GNzgt+99+nH+edGQ7h+RVU8OpWUQDgMYVMWKr81bHhL27Xo0pIAypguPiMezey9G1z4hA XOCZ054pZS07yekHcotAZLUT55QpJQ3A9ABZuF/1vPfbms4UFAj5OLBTRdj+YupPBrDIg E2dp0T97wCeIOGzQpGpTS2hY8+AIyzjgfW2BEKSL0RLrbhITm+bolyBmKQukUAWvi0Q== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=Icbuq2Si; arc=none smtp.remote-ip=74.125.82.46 Received: from mail-dl1-f46.google.com (mail-dl1-f46.google.com [74.125.82.46]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 05E6E606A325 for ; Mon, 30 Nov 2026 17:04:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 05E6E606A325 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, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=Icbuq2Si Received: by mail-dl1-f46.google.com with SMTP id a92af1059eb24-15ea896ddc8so17583561c88.0 for ; Mon, 30 Nov 2026 09:04:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796058283; x=1796663083; darn=vger.kernel.org; h=content-transfer-encoding:content-type:mime-version:message-id :references:in-reply-to:user-agent:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to:content-type; bh=I8rUrF9gEwP6gmxpTjJFTxsTZcZ6uE+aXe52kra5xNs=; b=Icbuq2Si07kORSZfVXY3sjXWijQhNWC476IgNC97CayAOz6WVoB5CXfEhnylnXvfs1 /YKneJWfqQNu1pOPjkaUjDzwnuVbS5VO3uicYtFv7wnkVITLMUUK58yqqk2Qm1B3AW4H 0AS0WeU/Knpa4JaWQXViACpxl0mr/KVJk9pVcl9n12U1npnZcKZEkhAZI3QY9YSdrbCh shioBVJILlKnM3w1rEr9vF9/j7t9NWnUlZgL1Pxxo5/QDMOwvwkq99/Uw8irTHQrFoS3 5+h2yIoJkXiKDzda88qjRFn7P0FcTAZNnRRVr0J4iKvYHZgI7TbhfNxAoiKCli+7LQBI eAMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796058283; x=1796663083; h=content-transfer-encoding:content-type:mime-version:message-id :references:in-reply-to:user-agent:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=I8rUrF9gEwP6gmxpTjJFTxsTZcZ6uE+aXe52kra5xNs=; b=1BIom/OGq4bUgvuCVOBAcUdVERynOer7ZbQADpsMuwnnCAdFPaKvuqcoY28VS+o43I z8XNIa3PjUcegHdjDbW4eCP0+oaKjprdBt/dsAUhPjGlQPj1Ap3e+YjDQHO8Lro7m0m6 bV/kl1sJhyxOqYt57yAZqLQwe36aW0ae1olOZGdZ2izZxEL2YcnE79VMAQRddXMuSgdy TySXpLtzjO0sgpEjAKQCAxufCzj0eMrvF7nP/jpANsPaqH0OlnMKUX//M60kDj1jAKqM qVDQigNDjEkHUiR/58utEt5HrqNzqfXXSujj3GuGTbiq0cUC8GoYNqPb2ZBQjvyjNr/j 6SxA== X-Forwarded-Encrypted: i=1; AL+hErFaw2d0E+eaCP4JjJwJIy/O7uqoLwkpgJIJkBC0hgoZANwqWP9AgMdftKdyM94exwbel27fY2Fu3AxpUg==@vger.kernel.org X-Gm-Message-State: APuU4Z+nzAoxjhm8rhdrCQcIKHs7Zj3zybx6rWiOekSvjaW7vww6pG9O JDfS1pgSq7IWFv5Qy9Nm2UnQ1Wu52fZYCgUHDclAHHVBocrhhnmxpjWA X-Gm-Gg: AZFdTZf1fc+lKCDWWZpHElosDsi8j97naiy12WiXiZ5DiAl8RLUE3qMzAmVFg8JC+GT aIh5ffwQ2qan1gAmDSUu44NXC15NWriNFTdR1069iQMxFnAzonjhLSMdHOzvLP1QsvosH/2BhlU +sJvCHnam1nEqbjT4UjyyGCm9rbauv/e2LIoLeu+Yjfmruf1sZJ+LQW2qj3xhmXvZjm3V/w/v6y rpdpTUvuoogdStrC8HnAnND3qrEQQCykOxgil765cBHqSR/3WRjEBqEwP8xi9p7/ShHeFGtGIHT 8UDzGfbZb53y+y/i5pUanC72/HFA0l9OEuuprB/nN/ui8KKP2CfobFND2rZqsKepTE4NocbUdTH jIFdL2i56lWisJddAPGk2L4hWRUq73YJ39IpH2lDwSQySE2SRkLW6SVq/TVn47iC7RUN0r+kun/ 0w7gXlN3XOcvx5SM4hdB6GKK9FQURVdkXcG5I34O/a/mmJVx2zxtoThAaRsUXmXVA3zPCJsFFiE bWm5AAHhi5GMO6ec00g954x5nN3EyMuNAOwDKXCJkcTVAjepPC6kMT2WPo61QYfBWg9KgFqdvHZ aAFBs97H5gMzUdFzEbdB93VQ7QITjLtkQbWxsbtookdxjahztbg= X-Received: by 2002:a05:701a:c96a:b0:14a:8cff:fbb8 with SMTP id a92af1059eb24-1b5568c8dffmr27309608c88.28.1796058282989; Mon, 30 Nov 2026 09:04:42 -0800 (PST) Received: from ehlo.thunderbird.net ([2401:4900:8fc5:92f8:cc3:d33e:6853:a9a7]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-1b5567e2bd1sm76601490c88.3.2026.11.30.09.04.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 30 Nov 2026 09:04:42 -0800 (PST) Date: Mon, 30 Nov 2026 22:34:24 +0530 From: Sanjay Chitroda To: Andy Shevchenko CC: Jiri Kosina , Jonathan Cameron , Srinivas Pandruvada , David Lechner , =?ISO-8859-1?Q?Nuno_S=E1?= , Andy Shevchenko , linux-input@vger.kernel.org, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: =?US-ASCII?Q?Re=3A_=5BPATCH_v2_3/7=5D_iio=3A_magnetometer=3A_hid-sens?= =?US-ASCII?Q?or-magn-3d=3A_drop_redundant_probe_error_messages?= User-Agent: Thunderbird for Android In-Reply-To: References: <20261127-19-oct-hid-iio-unified-print-framework-v2-0-3f476fe1a940@gmail.com> <20261127-19-oct-hid-iio-unified-print-framework-v2-3-3f476fe1a940@gmail.com> Message-ID: <6D3C4DCD-559F-4552-ABAB-C37BCB84F6AD@gmail.com> X-Mailing-List: linux-input@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 27 November 2026 4:39:01=E2=80=AFpm IST, Andy Shevchenko wrote: >On Fri, Nov 27, 2026 at 04:03:58PM +0530, Sanjay Chitroda via B4 Relay wr= ote: >>=20 >> The probe path emits error messages for conditions where the failure is >> either already conveyed by the returned error code or can be identified >> from the existing debug messages in the magn_3d_parse_report()=2E >>=20 >> Remove the redundant error messages to reduce log noise and simplify th= e >> error handling code=2E > >=2E=2E=2E > >> - if (attr_count <=3D 0) { >> - dev_err(&pdev->dev, >> - "failed to find any supported usage attributes in report\n"); >> + if (attr_count <=3D 0) >> return -EINVAL; >> - } > >What is the meaning of attr_count < 0 value? Does it hold the error code = already? > attr_count is not the error code=2E it's incremented for each supported ma= gnetic channel usage found in the HID report=2E >=2E=2E=2E > >> static int magn_3d_parse_report(struct platform_device *pdev, > >> - if (*chan_count <=3D 0) { >> - dev_err(&pdev->dev, >> - "failed to find any magnetic channels setup\n"); >> + if (*chan_count <=3D 0) >> return -EINVAL; >> - } > >Same question here=2E *chan_count is the number of IIO channels successfully configured from the= discovered HID attributes=2E >