> -----Original Message----- > From: netdev-ow...@vger.kernel.org [mailto:netdev-ow...@vger.kernel.org] > On Behalf Of Joe Perches > Sent: Wednesday, January 31, 2018 3:35 AM > To: Kirsher, Jeffrey T <jeffrey.t.kirs...@intel.com>; da...@davemloft.net > Cc: Keller, Jacob E <jacob.e.kel...@intel.com>; netdev@vger.kernel.org; > nhor...@redhat.com; sassm...@redhat.com; jogre...@redhat.com > Subject: Re: [net-next 2/7] fm10k: cleanup unnecessary parenthesis in > fm10k_iov.c > > On Wed, 2018-01-24 at 14:45 -0800, Jeff Kirsher wrote: > > This fixes a few warnings found by checkpatch.pl --strict > [] > > diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_iov.c > b/drivers/net/ethernet/intel/fm10k/fm10k_iov.c > [] > > @@ -353,7 +353,7 @@ int fm10k_iov_resume(struct pci_dev *pdev) > > struct fm10k_vf_info *vf_info = &iov_data->vf_info[i]; > > > > /* allocate all but the last GLORT to the VFs */ > > - if (i == ((~hw->mac.dglort_map) >> > FM10K_DGLORTMAP_MASK_SHIFT)) > > + if (i == (~hw->mac.dglort_map >> > FM10K_DGLORTMAP_MASK_SHIFT)) > > Strictly, only the if needs parentheses here, but I > think it reads better before this change. >
I don't really find the extra paranthesis around ~hw->mac.dglort_map to be that useful here. Thanks, Jake > > @@ -511,7 +511,7 @@ int fm10k_iov_configure(struct pci_dev *pdev, int > num_vfs) > > return err; > > > > /* allocate VFs if not already allocated */ > > - if (num_vfs && (num_vfs != current_vfs)) { > > + if (num_vfs && num_vfs != current_vfs) { >