Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp962261lqs; Fri, 14 Jun 2024 10:23:52 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVqvMv3IhS4FyXqyimOcNYcFu3XFiGdLl5FjIT/bLOwXO3vfkJKhH7ApFZUWgBHQKgflnEVVBm3Iz1kUrZKKpFpeI5J/KnvpNoSZJLq9A== X-Google-Smtp-Source: AGHT+IEotG7dAKXYUfw+eC0MfFWaX/kb4RsgvxaMQZXnniCvubK4JqHf3XBOGw5S4rtn/vite3zV X-Received: by 2002:a05:6a21:32a5:b0:1b4:c499:788d with SMTP id adf61e73a8af0-1bae7ec310cmr3890179637.15.1718385831985; Fri, 14 Jun 2024 10:23:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718385831; cv=pass; d=google.com; s=arc-20160816; b=lrxUGlcN1cLvKbHHDbJNwMjxv0tMBAEolZbP2VTiz6GfpEONfY06BaTK4AJ8tqWrRG d0Y9uVnbywlBw7abi/snDpBfsFNdi9jMDc1J4jb4criMwMAWB1J17h+n0DP2t91BaYGA BZYGv26J7xTaea+y1IoG8srArr/durGo3vwRJzBpMgeRjRDBQoHTEp2MMh6N/9aY/tQ0 y66dXbGurirDFEGXcO/wptjMVW3H482nbIO3i6Twc0VK8rNAbi0z2jfasUu3gpb8iPsU TzUk/+v7S/ipuslQ2KF3H398guMtsj20amiehA8uI77wjaW4o66nQu2+K+qUO9MIYd0M YTww== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:date:references:in-reply-to:subject:cc:to:from :dkim-signature; bh=/iiG4vFIZ38MXvOcAlrpemCi3LyL4Xdk/H4OkWaE6LY=; fh=9nrEZsTs9d/GFZZIpHSBMNPgpcsr1QD34lYCam5NpxE=; b=ZoJ5M8z4YcoC2Q2T4hDLZ9Cp+bfNzmMT9flDziMm7gCm7hL3b/lG0qJG2PjVjqs+3X rYvXPU15Ta9xETRoMTazWsvkYwyYBfGH+G6CEq5ksI/6iH6yHInPAYfKmVFzf2UqpRdF LYI/5H7/1mOUUg1CU4hKszXXxqrrOE1s55qZ82Q4MWiilI/ITUaceSXT3F+Y6bH2YftK SZ1yKOQ749R8gsuoQU/vF4fJcwd0xXiBdlKfdnjBTfmWy2Dcj83z2XAmkhP6U5yIhWvQ f1uzif0umhwHD3Uy4RUqr3LJOY51OtTGPfX0kXWsbxyU8x7nBimJzelpJu24Wl7JkqGi bcPQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@jubnut.com header.s=MBO0001 header.b=opGQI9ec; arc=pass (i=1 spf=pass spfdomain=jubnut.com dkim=pass dkdomain=jubnut.com dmarc=pass fromdomain=jubnut.com); spf=pass (google.com: domain of linux-kernel+bounces-214005-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-214005-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=jubnut.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2c4a76f5ad8si6174659a91.161.2024.06.14.10.23.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Jun 2024 10:23:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-214005-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@jubnut.com header.s=MBO0001 header.b=opGQI9ec; arc=pass (i=1 spf=pass spfdomain=jubnut.com dkim=pass dkdomain=jubnut.com dmarc=pass fromdomain=jubnut.com); spf=pass (google.com: domain of linux-kernel+bounces-214005-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-214005-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=jubnut.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 59E58B24876 for ; Thu, 13 Jun 2024 20:50:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 96C1113BAC8; Thu, 13 Jun 2024 20:50:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=jubnut.com header.i=@jubnut.com header.b="opGQI9ec" Received: from mout-p-101.mailbox.org (mout-p-101.mailbox.org [80.241.56.151]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2570713541B; Thu, 13 Jun 2024 20:50:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=80.241.56.151 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718311840; cv=none; b=SHAoRUiXYCw9UBvLV48PFtOuDWgoM6+y6xOa0asKRCjvg2OKX1q30mZJWRQLqAPDa196Cq5RSFNK55N+1y3TiZS/xpNA0E4DLw/ctNiSqdO99DGxr/++8OQyZDltjjWq8oImo6hP5NqfdGVsekKuPA09osLs6q5/o0XJuDXCQ0A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718311840; c=relaxed/simple; bh=/iiG4vFIZ38MXvOcAlrpemCi3LyL4Xdk/H4OkWaE6LY=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=YuhQbKhfd0EZxVnkUw69BmOI/WoJMXACorrKGPyiisQHumkhDVhC8LH+qT7AQHTdaI6+NRvjQtR1ZjuGgPhuy+2U3Kwx6M83YEuCHAPVU/YmSANBTNqHXifcR+4NAfO2kadgHwreOekiT/WxZEBTMqIp0v8QaEirbXTExN9Er7I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=jubnut.com; spf=pass smtp.mailfrom=jubnut.com; dkim=pass (2048-bit key) header.d=jubnut.com header.i=@jubnut.com header.b=opGQI9ec; arc=none smtp.client-ip=80.241.56.151 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=jubnut.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=jubnut.com Received: from smtp202.mailbox.org (smtp202.mailbox.org [IPv6:2001:67c:2050:b231:465::202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4W0ZL76zJfz9sq4; Thu, 13 Jun 2024 22:50:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jubnut.com; s=MBO0001; t=1718311824; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=/iiG4vFIZ38MXvOcAlrpemCi3LyL4Xdk/H4OkWaE6LY=; b=opGQI9ecLlIFg++mCvNjcXejr7aZJSrHM2hnUkXN39qe5uP5zFjPMtLeCgaKBXlIAyCMB7 h3uy1y0nHpcSlbjx33jLIn78epOgHPoza7g8zd6X5eLR2djixq73b+VXPFyuLaDzdKSUK5 z7QMBKyxScwTExX3FcTGK7ecXMq/RQlUsUheFTbdUbmZhI7B0FkkApk3ExGzZGexComo5h XFa7bnnpXytw8wI9FNKw4BPrbAicmjyTZD3zbQAQkW4uN+qVH2k61I+/pjwB1YNDpH2wTZ R3fTf5xEmyOkKV/6ayqCtp/Fss152Kj0+hLkbquBK4+voDmCMQkNk4TsY8a+0g== From: Ben Walsh To: Dan Carpenter Cc: Benson Leung , Tzung-Bi Shih , Guenter Roeck , chrome-platform@lists.linux.dev, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: Re: [PATCH] platform/chrome: cros_ec_lpc: Fix error code in cros_ec_lpc_mec_read_bytes() In-Reply-To: <68f1d8df-69d2-4246-8c64-4c7cc975feb1@moroto.mountain> References: <87sexgrdk4.fsf@jubnut.com> <3226cba0-82c5-47a3-89da-01ffa935a9dc@moroto.mountain> <87sexgaemn.fsf@jubnut.com> <68f1d8df-69d2-4246-8c64-4c7cc975feb1@moroto.mountain> Date: Thu, 13 Jun 2024 21:50:21 +0100 Message-ID: <87h6dwa7oy.fsf@jubnut.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 X-Rspamd-Queue-Id: 4W0ZL76zJfz9sq4 Dan Carpenter writes: > Perhaps the cleanest thing is to delete the length == 0 check in > cros_ec_lpc_mec_in_range() and add one to the start of > cros_ec_lpc_io_bytes_mec(). > > I think that's a good solution. I think it's a good solution too. I'll send a patch. Thanks!