From patchwork Thu Aug 25 11:17:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sakari Ailus X-Patchwork-Id: 600030 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1CBBFC28D13 for ; Thu, 25 Aug 2022 11:17:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240031AbiHYLRP (ORCPT ); Thu, 25 Aug 2022 07:17:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53752 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237854AbiHYLRL (ORCPT ); Thu, 25 Aug 2022 07:17:11 -0400 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A0EAFAEDA3; Thu, 25 Aug 2022 04:17:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1661426230; x=1692962230; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=z5RouuAve2+jxGRgV1TIbVlWtMgQgmKAmpebOxdUZwU=; b=KQkhTVM8Jaj3bFzcqbgXj7v6PD/PGsoRcbBS/QQ36GC/XB21V+7YPSGA YE6g5m4cFOeRQoQIhM63JZzxpz8zVuo8GUNEVsjgjmdQtozPGQah9m+Gv HYWlqyaYCF/YH1peGGcj4N0DYzCfRXLqk0xlKV9439ELVkQfR13L8gzgW KGE7uz8X5z7QXWWmQYTsv2Fn24ziS+Jyen5gn4o6sj4YncTyZUWB0ZCkV yF435BpSPJEaYX+rJpwx/Jso5Tf5NuHhrDA2HMXB0k1LGY/4D4n7PQOL5 l/AkP9mxCArY+80tLGmW3RFgm5GP3Yr4eAPYGLlCBF5KczuvdHDYzkbdZ w==; X-IronPort-AV: E=McAfee;i="6500,9779,10449"; a="281183062" X-IronPort-AV: E=Sophos;i="5.93,262,1654585200"; d="scan'208";a="281183062" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Aug 2022 04:17:06 -0700 X-IronPort-AV: E=Sophos;i="5.93,262,1654585200"; d="scan'208";a="736225192" Received: from punajuuri.fi.intel.com (HELO paasikivi.fi.intel.com) ([10.237.72.43]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Aug 2022 04:17:04 -0700 Received: from punajuuri.localdomain (punajuuri.localdomain [192.168.240.130]) by paasikivi.fi.intel.com (Postfix) with ESMTP id 63F2A20531; Thu, 25 Aug 2022 14:17:02 +0300 (EEST) Received: from sailus by punajuuri.localdomain with local (Exim 4.94.2) (envelope-from ) id 1oRArM-00Ch8J-3Z; Thu, 25 Aug 2022 14:17:16 +0300 From: Sakari Ailus To: linux-acpi@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Ard Biesheuvel , sbinding@opensource.cirrus.com, andriy.shevchenko@intel.com, patches@opensource.cirrus.com, rafael@kernel.org Subject: [PATCH 1/1] acpi: Remove default association from integer maximum values Date: Thu, 25 Aug 2022 14:17:15 +0300 Message-Id: <20220825111715.3025694-1-sakari.ailus@linux.intel.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org Remove the default association from integer maximum value checks. It is not necessary and has caused a bug in other associations being unnoticed. Fixes: 923044133367 ("ACPI: property: Unify integer value reading functions") Signed-off-by: Sakari Ailus Acked-by: Ard Biesheuvel --- drivers/acpi/property.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/acpi/property.c b/drivers/acpi/property.c index 91d0e75859d37..d4c168ce428ca 100644 --- a/drivers/acpi/property.c +++ b/drivers/acpi/property.c @@ -1046,8 +1046,7 @@ static int acpi_data_prop_read_single(const struct acpi_device_data *data, u8 *: U8_MAX, \ u16 *: U16_MAX, \ u32 *: U32_MAX, \ - u64 *: U64_MAX, \ - default: 0U)) { \ + u64 *: U64_MAX)) { \ ret = -EOVERFLOW; \ break; \ } \