Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp1248659ybh; Sat, 7 Mar 2020 22:57:24 -0800 (PST) X-Google-Smtp-Source: ADFU+vtQyIkonEpcqh4Zs4RV3CeXyCoCGY8GG2K8otlfE1s4zT9oL12difZLcXF58tbTnA34W7bW X-Received: by 2002:a9d:2aca:: with SMTP id e68mr4865518otb.324.1583650644805; Sat, 07 Mar 2020 22:57:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583650644; cv=none; d=google.com; s=arc-20160816; b=aOWmCisEhM6EzrnpefYKu1/qCRydZYAduiQzwRbk6J1GiIDAL6KCiAlXUVLX3ZI78x CVqwCVXVOs22KDbwiEeYJpce2ei6IUM32sptFIDHAklyZOHvmO7gDc+hRNeAPWStbl/p +CcGYwGAJdXAWhIvQMl/c7gSvMRZS3OSvujywPQxs9brWTa8M+6mnYkE/qPiVc8M6+OQ 4gqGIfhBQwbcGHBWVr2dExE4IiwTvI/GbC81P6sXPEb/93uyGp9VC6Vcnd1ISFrOAcev tPr2cbMOSu7G0PgU08oR0/yxnnHr/5MeL2a3J/57weWSvUcl4espdqjH88wjF2abTrNo dh1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=d2IOdpwHhozLLbuMaefALBYq8oCXlI3DITw+16B4bzU=; b=F1smzqmJ2Jck3R0xbGyauyHqMES/Lr9BHAoOKM8l6zjbVOSN+dSbZIii8IsnNSimUS ymyAeP5OlRc6bZGnk3rkqFk2HlJFifAVqoEaWDw8eps4YuiFUF4EL7B3ypqBEIC8XEN2 3OhR5bZPuxyD0AG4g/kiVLysaoHRUxw13Dkv7QmXEqKllKEGJVn4rczBfyF0vY8Z9YRh l9rxv3oMzRJ6M1nHCZpxX9GF6uTHdsGnpJBlEtIVJTKA9auFjTPqeWwB9xMBgaF4ioVE FZSSzNvZXZB2AFcI6ilu5qyFdi4KH05dOmgDuozypChdQ6mHGq0VtJL3uZ6L6bRvhUFs 5eIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=l1IIJTAJ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f6si4689116otq.50.2020.03.07.22.57.13; Sat, 07 Mar 2020 22:57:24 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=l1IIJTAJ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726297AbgCHGzm (ORCPT + 99 others); Sun, 8 Mar 2020 01:55:42 -0500 Received: from mail.kernel.org ([198.145.29.99]:33136 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726096AbgCHGzm (ORCPT ); Sun, 8 Mar 2020 01:55:42 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 52B9420828; Sun, 8 Mar 2020 06:55:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583650541; bh=lAhBIsdsIoz5OulCUzYlLY6/s6fpUovxZYcQI0rfdIw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=l1IIJTAJDx5Qruopgru/0PHNXaifkm/SG+nmoGSA+OoHvztPFvHRABTQAaUA+jFtg PY1LVMKQWkdbSYFJmE/AhZ8eG1ysmmpbYH9EwlYboup0gqmdxTWt57xzpNiwMZICl5 cC00WBkrfsBeesUzridpLEEHJ5hlrFGmKHiXp1sM= Date: Sun, 8 Mar 2020 07:55:38 +0100 From: Greg Kroah-Hartman To: Oscar Carter Cc: Forest Bond , devel@driverdev.osuosl.org, Malcolm Priestley , linux-kernel@vger.kernel.org, Gabriela Bittencourt , Colin Ian King Subject: Re: [PATCH] staging: vt6656: Use BIT_ULL() macro instead of bit shift operation Message-ID: <20200308065538.GF3983392@kroah.com> References: <20200307104929.7710-1-oscar.carter@gmx.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200307104929.7710-1-oscar.carter@gmx.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Mar 07, 2020 at 11:49:29AM +0100, Oscar Carter wrote: > Replace the bit left shift operation with the BIT_ULL() macro and remove > the unnecessary "and" operation against the bit_nr variable. > > Signed-off-by: Oscar Carter > --- > drivers/staging/vt6656/main_usb.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c > index 5e48b3ddb94c..f7ca9e97594d 100644 > --- a/drivers/staging/vt6656/main_usb.c > +++ b/drivers/staging/vt6656/main_usb.c > @@ -21,6 +21,7 @@ > */ > #undef __NO_VERSION__ > > +#include > #include > #include > #include "device.h" > @@ -802,8 +803,7 @@ static u64 vnt_prepare_multicast(struct ieee80211_hw *hw, > > netdev_hw_addr_list_for_each(ha, mc_list) { > bit_nr = ether_crc(ETH_ALEN, ha->addr) >> 26; > - > - mc_filter |= 1ULL << (bit_nr & 0x3f); > + mc_filter |= BIT_ULL(bit_nr); Are you sure this does the same thing? You are not masking off bit_nr anymore, why not? thanks, greg k-h