From nobody Thu Nov 28 10:36:02 2024 Received: from mout.perfora.net (mout.perfora.net [74.208.4.194]) (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 0C5D81D0964; Wed, 2 Oct 2024 15:13:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.208.4.194 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727881986; cv=none; b=hRDHZkwyw0+tJfNlDhdS8w2bQSBGXCMlFUMUDbj00wFWNNoE+Zfw/BVWvoo/AyDxIgwMVU3BQWt9QxtPnQTvZpDoGpZPPtebYh14W4SuZ5TSu3MOR/0/5cp7l2/KevHespPC+wUvuaFLcf2xmRK25t1xCGcwpYMAdfiPG0J1LgI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727881986; c=relaxed/simple; bh=KndFyGM1uAUMUOnpOlWVUKPyDe0gPzTWSQrE7Ofea8U=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=kFphE+KkYa1KcG528xga7gSuw8KT60srsekwGo0ZBoB4THdijFy1eF2EKJxhc2dIVtXHayAcPBRmFjbzuWvQKtVPbqMxz9E6u8wTDWq7W+ohdXs9Ukyggm4d79fbxUDK2ckazzYaeD05n6xT7fClcUYi8zmwVuWUKVndPkwNuHw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=finest.io; spf=pass smtp.mailfrom=finest.io; dkim=pass (2048-bit key) header.d=finest.io header.i=parker@finest.io header.b=vXzMflkY; arc=none smtp.client-ip=74.208.4.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=finest.io Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=finest.io Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=finest.io header.i=parker@finest.io header.b="vXzMflkY" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=finest.io; s=s1-ionos; t=1727881975; x=1728486775; i=parker@finest.io; bh=z4NFjvndw+1Z7Ias/lvqJM5lh4X+wHBD6u0I1U1F6AE=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:Message-ID:In-Reply-To: References:MIME-Version:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=vXzMflkYhGzwZMu2Ro1c2aPMKG4Uw/oXyWkOIGwCm1uy1uge0UwiUwHfjDtrZ7WE /NekFq6rsokrY0wY8mKPDDV+EG83pU8KrGcebXsT3EpXs3ktyEokqnTSCwQhUIqdl PNdVcezAmCicwWrqpIL83thtPxKjt09pjps6zU4cTkjB8oLtfMTpQzBDD0PqD4C0J 0Hw4ma1aZX6KAyhv2RMA0d9rC8p9qbV297BINEqDRm6Euq5ILyH+GohnSBLQf1D1u Omat5+yWHunY2x6PTmbcBRk1pTH1LZ6e2qXcxaS0Mg5zeYfx8/DoFqHIgONDbjlUu fabaQq0OtFKEs7m1Mg== X-UI-Sender-Class: 55c96926-9e95-11ee-ae09-1f7a4046a0f6 Received: from finest.io ([98.159.241.229]) by mrelay.perfora.net (mreueus003 [74.208.5.2]) with ESMTPSA (Nemesis) id 0Mdb4M-1sWg7H2WOS-00SEQY; Wed, 02 Oct 2024 17:12:55 +0200 From: Parker Newman To: Greg Kroah-Hartman , Jiri Slaby , Andy Shevchenko , Arnd Bergmann , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org Cc: Parker Newman Subject: [PATCH v4 2/5] misc: eeprom: eeprom_93cx6: Switch to BIT() macro Date: Wed, 2 Oct 2024 11:12:34 -0400 Message-ID: X-Mailer: git-send-email 2.46.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Provags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== Content-Type: text/plain; charset="utf-8" From: Parker Newman Use the BIT() macro rather than (1 << (i - 1)). Reviewed-by: Andy Shevchenko Signed-off-by: Parker Newman --- drivers/misc/eeprom/eeprom_93cx6.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/misc/eeprom/eeprom_93cx6.c b/drivers/misc/eeprom/eepro= m_93cx6.c index 4c9827fe9217..e6f0e0fc1ca2 100644 --- a/drivers/misc/eeprom/eeprom_93cx6.c +++ b/drivers/misc/eeprom/eeprom_93cx6.c @@ -8,6 +8,7 @@ * Supported chipsets: 93c46 & 93c66. */ +#include #include #include #include @@ -102,7 +103,7 @@ static void eeprom_93cx6_write_bits(struct eeprom_93cx6= *eeprom, /* * Check if this bit needs to be set. */ - eeprom->reg_data_in =3D !!(data & (1 << (i - 1))); + eeprom->reg_data_in =3D !!(data & BIT(i - 1)); /* * Write the bit to the eeprom register. @@ -152,7 +153,7 @@ static void eeprom_93cx6_read_bits(struct eeprom_93cx6 = *eeprom, * Read if the bit has been set. */ if (eeprom->reg_data_out) - buf |=3D (1 << (i - 1)); + buf |=3D BIT(i - 1); eeprom_93cx6_pulse_low(eeprom); } -- 2.46.0