From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qv1-f45.google.com (mail-qv1-f45.google.com [209.85.219.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 B6FD43BFAD9 for ; Mon, 15 Jun 2026 07:35:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781508910; cv=none; b=KsH9T38yDIWDlZY9IVOAaMKg25UPGXLxquYnrx8hQeilZJMEDZwehQbA7OjQ9gCWZ9Fal1oDoLEMWrGyxkifeVzWL8p0/5888EJQ50V/7vH5j30RmO9E3StwA6XSrvZVZjSoiIRcVlFPZ5hFHQ33eDmf/UNmPh4YCDgQDIXd8X0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781508910; c=relaxed/simple; bh=nGnSPCnQwdzuVsfOmWrEqZnxe9yilGxaDndIXWUkAGM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=aDWdN72ew7+vjJGZBhCSMMxE6l1/NssfN2YzvbQtLsptSxf/y9xF7hZqmlIoVUgKIJtG0VHnmJqOh+baFXoz46PX8k8H6AgIfZps8mHe/51AAzA6bv2JLQrx/c34ZPX/IRo3wrINdTrgdnOLJ8ONsMINcWOiTlvTc1Yhn+FnT1w= 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=EwrQW4ud; arc=none smtp.client-ip=209.85.219.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="EwrQW4ud" Received: by mail-qv1-f45.google.com with SMTP id 6a1803df08f44-8cce26ee1e9so48992956d6.2 for ; Mon, 15 Jun 2026 00:35:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1781508907; x=1782113707; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=IVJ2SgZJKrM5Glp+hNfPWwv4XWSIB/g6FTAAAMIWkoE=; b=EwrQW4udCP/LVnfID7K0sZ2IbWAlKzW5ToyCNhWuGgpeobzayciiKf0oAdf6I7mnMa PwhG/BBfSdhnI2a+USNMSY/GEDmu/LJV15/0Jqal4wEECS0X1cO7Drt+2XnG72NZtzZf 01IAUZAeVNR39whnUAJPZZDcFAfRATlN/WcTUIAu1Gp/r7HFf9gzJ85U0IT3wJxN9ikl jo/n8WQKRAOS/8ecLwZL3wswJFWDhFYj2B8+/WAyVIGDk9ukGoFjmP1oQjToRjpD0uh2 EjrTF7F/tZaaPebcLtQ1T2oVts5s8pjAGWYHjgKlFpqUKXQBdT5PsPMY9Kxw/15TsLgK nfpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781508907; x=1782113707; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=IVJ2SgZJKrM5Glp+hNfPWwv4XWSIB/g6FTAAAMIWkoE=; b=kLEhf/tvnjLocvf8qT2mACJ919YzXrKzXh9xUkLN5I2PQ9yt5ZphGrfMl1aVZPO2JH TMpdoD0fsV+lST04jdxBU3rs9aA+crDJcE7h29txU9td6vvyKbMV1UlV+s2UTqtXAOov 6H2S8dxTA1H3lys4whEu2AzoQpsqe5pjzlOb0GTpDQ5qXJIe9HKCPfyKU8D2Zs4oUiqr KWnwRycj+e8LxxkNPqROUD/7pcaT0YnOFOIl8YXm74CAXqYWCbOK3B5gEgzd71rdWD5o bE/r+oGOiSOKewjXBCHAUi2TCupUNYlb3/B49QpB3DtG+umlrwqKMCbOixQpH95cMWgQ ju+w== X-Forwarded-Encrypted: i=1; AFNElJ90t8qt89VYRwoWsjWhnk/n3FT59z5M2tdi2dbIt7TV0H6Hxtg2UuMIOheilEQLBPdVgvB3N9Px19OEZRE=@vger.kernel.org X-Gm-Message-State: AOJu0YyfMKlEB5zdPApCVV0C4li1bERYi2K/yYG10ULaxBpDaPtGZjXO LsqxvZaBFa3bFSmmTuU/ydvlwCyU3KmCqHHAXYBB74BJaxf3HKGL6798 X-Gm-Gg: Acq92OHpX3+OPmdGCMC3wKcCfUkC0R/HhN5Z94/MVbohUQOengA+prmJKTXKs/kRldN ewTStwG7MsQI4f2b27bGny9RLZXmKOaryV8j98ekQ0GI2DgWL1mR2A1oHyPjW5s5+TReD86tAgS ID8/ZCG8Fth3OT/Cy9shRvBQlgbtGq4vPDaONB+1kmEu4NiSd77OHL3irQ4k7TdrXKGO8hkMUJu KWxrTTG2YrNDH8SkssoqYqyEEEdF9j4X6uP4dmSFGXpsidcoFe75DZgOQXjfc2bnFRhhD5T7x/w 0goOCKXN844XRl7aEtzprXFfuJtoRcuenKJunv4qQHuW+cl9LgOze8AqmMMKQccKNiZ+/Svdcjp roL9SCub/yw7m4Rw8qnJv3lprvEfJMXfDURYzaauXH/eN6NqaLqpEwbYL2oOZo4auLS0/i8Cz/e Kza0Hf5JGQrqTo68oL X-Received: by 2002:a05:6214:2522:b0:8ce:ee76:1597 with SMTP id 6a1803df08f44-8d44fce0ffamr168956306d6.43.1781508907477; Mon, 15 Jun 2026 00:35:07 -0700 (PDT) Received: from localhost ([43.225.189.75]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-8d30105fd9csm108145536d6.10.2026.06.15.00.35.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jun 2026 00:35:06 -0700 (PDT) Date: Mon, 15 Jun 2026 10:35:00 +0300 From: Dan Carpenter To: Abdelnasser Hussein Cc: gregkh@linuxfoundation.org, vaibhav.sr@gmail.com, mgreer@animalcreek.com, johan@kernel.org, elder@kernel.org, greybus-dev@lists.linaro.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Dan Carpenter Subject: Re: [PATCH v3 1/2] staging: greybus: audio_codec: fix sscanf return value check Message-ID: References: <20260614154329.5176-1-abdelnasserhussein11@gmail.com> <20260614154329.5176-2-abdelnasserhussein11@gmail.com> 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-Disposition: inline In-Reply-To: <20260614154329.5176-2-abdelnasserhussein11@gmail.com> On Sun, Jun 14, 2026 at 06:43:28PM +0300, Abdelnasser Hussein wrote: > Smatch static checker warns: > drivers/staging/greybus/audio_codec.c:335 gbaudio_module_update() > warn: sscanf doesn't return error codes > > The sscanf() function returns the number of successfully matched input > items, not a negative error code. Compare the return value directly > with the expected number of conversions (3) instead of storing it in > 'ret' and returning it as an error code, which leads to returning > a positive value on failure. > > Reported-by: Dan Carpenter > Closes: https://lore.kernel.org/all/YoOLnDkHgVltyXK7@kili/ > > Signed-off-by: Abdelnasser Hussein There shouldn't be a blank line in the middle of the tags block. The closes tag isn't right... https://lore.kernel.org/all/202103080429.X31wogmF-lkp@intel.com/ Sorry, this stuff is a bit confusing to everyone who is not involved with the zero day bot. What happens is that for some warnings, they first send the warning to me and I look it over and decide whether or not it's valid. In this case, I decided it wasn't valid. Sure, I can understand why the static checker thinks we're propagating the return from sscanf() but actually the second else if is always true. (I haven't actually checked that btw, I'm just assuming that the second else if is always true. Static analysis is always a best effort type of thing). regards, dan carpenter