From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.82.51 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796058284; b=OlOdy7z1P9Nwh7clVUWofLhDvM8RNeHvSySmh0amF/dnttWKULZIV6R37Gvbiwy/vxJ7 DLWo1ZsZHArAZ6sN83ihzwJizrfVQxACprYM/ULVZevssrYdB5bcktkvMTjlnM7PGLmyR ONOmqEOCG4Oqc8nuXNTHLvJhVXdqHByvo5SIBYt9HZBJXr6rWczipMZ7uQWo20yotRuwb V5tMhWizezMDacOvrXxuiCs86nMu5580GsQRtHL+x83TAMz99QAX0kzQ5RTpfo8/xo99c HzUZk1YVi/8o/pSnmJXbm3pXK6yo3J63U+G0YX5xL85xnP40sKhNCXZZLtGzCYazMxw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796058284; 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=1QMbPDN7yHnQ8UUKe5EicJL8b1uO12an1nU+Fxm6St7muaDdTCt28EQl8raio4K8N+fG MbxJRGH9UanJYtCA1Yqf1kOsD+g6EDfmBt2sTqdso8V5nLB92oconTt604jxgaQM3mJug Z/rP7yPJagqPhvkYzNopy8UmTdmXn8I64WIzmUPUmuGND4r/YtE1nCh6Xva1GKtUtuwgf NUe5ywe1dgsXMkXt5xCZXZkQ/Nn/htPnxhUFSJtAMaYY8n2FF8YLUUrNRHrCiLv/9KUu6 QdGx7V6LjXbnDPOwx15CAXAHXJGfURGBC+r5T0NnF73fWukRKtIjwQKZbL9t0DJ2V2A== 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.51 Received: from mail-dl1-f51.google.com (mail-dl1-f51.google.com [74.125.82.51]) (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 04BA3606A320 for ; Mon, 30 Nov 2026 17:04:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 04BA3606A320 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.a=rsa-sha256 header.s=20260707 header.b=Icbuq2Si Received: by mail-dl1-f51.google.com with SMTP id a92af1059eb24-1b5ade5e0c1so3237407c88.1 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=ZVSQjxQ/wxGUNh4woC3+fyxdnpsFFT9z4c+b/0XBu+C6nD41RLKYdr4MpInH0WGefq IA6YotJjlPwL+nviwqXMJWD3RV/PXKPqX3eBmbfyguB22S8WxPf+BkBF58IywxM9nWWc pb/9NphdsGOfLOQElfpKvdt9Bu8EfCADVO6/i+loY+vsfgfgU972oL6qWANcqXBrcZMw IFYbmh/Kg2YF3SDioBArcTjBgLLlQlRoMSf8siu30VJTP/UcZty6z92sRP3alWKXnErV gyJt5Jek5yXDlzyg30jIiG790DzEfTmD3oV31ZcREF0ufA1/xhh87Tju5BRvkL8nCGsW PHqg== X-Forwarded-Encrypted: i=1; AL+hErGCQgvKyTKTk14rVVxEthVOtV70ZpefPwpk5NgCOuUI64ijOSGlN2dkDoqlTiLoTFoPhvDdq+U0yEpaRRg=@vger.kernel.org X-Gm-Message-State: APuU4Z8oRUAhQR+nWyyAI3HPK36+kAALK5TUKgP0RC95vRLkekAT8R2E NDekMeioi+3ImY80TqraCQ0LpX5m5QWqby0KTyBpsyOells8daQwdAbm X-Gm-Gg: AZFdTZf/h3KHv179JxuS1E9jWoVKKUGEvjSD7QMDJdKtWlIVeKnls7/MEvr12huKebl YsUFzyXxTKLVa9sJp5MxgQRTQRdGiBQesXXS+sCTjtMdQtEPSmAMR3qxvGjskNEJ3Re9dwkSgeD O1i2AVl/qrFuBL+oRZ0jgZnZhItzU7+8NgFQDALFF5iD5iim4rrtWwRgo47EVwyXfO/EjOKL3hY PubrA4lv8i8/SP+wx8XCmTmkJGVT3n+mqPtEuSGBZ9zhe9hn/+SUvPknp6x9mxl9stfXWjEMlGt 1Zo4/uM7Zn5nx9DqD4cgOYH+25NrE2r/ntvksIiHIdVcAkEmS9APMCQH4pvnhRSyJRZaemB9RjE 8u1kAMcdumMUu/3IN3TbDJHxdLzrbuOFItgcLzYqfJIXtXsvMXoay0QvXZgn57kCZJzTiLMZTq5 uSfxm4K8BvkRMwrpNhr3w7bB4G2hEO0Ew0B21v1sZ+n9Dd0qBzQ9CIvDmngN23xrTkNOdrwyjuN ikSwNXAcZwydMwd5v+z+JXQmS85I38Ea8PF4CiAPB+YL3oHgH09FPW+N4v09J5rdLp02tbHbnzv 8mlZbhZ9UHySC7e/9mivLcTbZA9gPPgNu6rTI0OXbUP1WxONwYo= 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-kernel@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 >