diff mbox series

osm_mesh.c: Improve one line of comment

Message ID 20180806143429.32545-1-honli@redhat.com (mailing list archive)
State Not Applicable
Headers show
Series osm_mesh.c: Improve one line of comment | expand

Commit Message

Honggang LI Aug. 6, 2018, 2:34 p.m. UTC
From: Honggang Li <honli@redhat.com>

Signed-off-by: Honggang Li <honli@redhat.com>
---
 opensm/osm_mesh.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Yuval Shaia Aug. 6, 2018, 2:41 p.m. UTC | #1
On Mon, Aug 06, 2018 at 10:34:29PM +0800, Honggang LI wrote:
> From: Honggang Li <honli@redhat.com>
> 
> Signed-off-by: Honggang Li <honli@redhat.com>
> ---
>  opensm/osm_mesh.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/opensm/osm_mesh.c b/opensm/osm_mesh.c
> index 8f84e53d..073a21e5 100644
> --- a/opensm/osm_mesh.c
> +++ b/opensm/osm_mesh.c
> @@ -1038,7 +1038,7 @@ static void make_geometry(lash_t *p_lash, int sw)
>  
>  				if (!s2->node->axes[l2]) {
>  					/*
> -					 * set axis to opposite of s1->axes[i]
> +					 * set axis to opposite of s1->node->axes[i]
>  					 */
>  					s2->node->axes[l2] = opposite(seed, s1->node->axes[i]);

I believe it is better to delete the comment completely as it does not give
any extra insight over the c code.

>  					change++;
> -- 
> 2.14.4
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Honggang LI Aug. 6, 2018, 2:49 p.m. UTC | #2
On Mon, Aug 06, 2018 at 05:41:24PM +0300, Yuval Shaia wrote:
> On Mon, Aug 06, 2018 at 10:34:29PM +0800, Honggang LI wrote:
> > From: Honggang Li <honli@redhat.com>
> > 
> > Signed-off-by: Honggang Li <honli@redhat.com>
> > ---
> >  opensm/osm_mesh.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/opensm/osm_mesh.c b/opensm/osm_mesh.c
> > index 8f84e53d..073a21e5 100644
> > --- a/opensm/osm_mesh.c
> > +++ b/opensm/osm_mesh.c
> > @@ -1038,7 +1038,7 @@ static void make_geometry(lash_t *p_lash, int sw)
> >  
> >  				if (!s2->node->axes[l2]) {
> >  					/*
> > -					 * set axis to opposite of s1->axes[i]
> > +					 * set axis to opposite of s1->node->axes[i]
> >  					 */
> >  					s2->node->axes[l2] = opposite(seed, s1->node->axes[i]);
> 
> I believe it is better to delete the comment completely as it does not give
> any extra insight over the c code.

I suggest to keep it. Coverity reports potential COPY_PASTE_ERROR issue
in here. This comment tell us Coverity gave us a false positive warning.

> 
> >  					change++;
> > -- 
> > 2.14.4
> > 
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Yuval Shaia Aug. 6, 2018, 3:39 p.m. UTC | #3
On Mon, Aug 06, 2018 at 10:49:01PM +0800, Honggang LI wrote:
> On Mon, Aug 06, 2018 at 05:41:24PM +0300, Yuval Shaia wrote:
> > On Mon, Aug 06, 2018 at 10:34:29PM +0800, Honggang LI wrote:
> > > From: Honggang Li <honli@redhat.com>
> > > 
> > > Signed-off-by: Honggang Li <honli@redhat.com>
> > > ---
> > >  opensm/osm_mesh.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/opensm/osm_mesh.c b/opensm/osm_mesh.c
> > > index 8f84e53d..073a21e5 100644
> > > --- a/opensm/osm_mesh.c
> > > +++ b/opensm/osm_mesh.c
> > > @@ -1038,7 +1038,7 @@ static void make_geometry(lash_t *p_lash, int sw)
> > >  
> > >  				if (!s2->node->axes[l2]) {
> > >  					/*
> > > -					 * set axis to opposite of s1->axes[i]
> > > +					 * set axis to opposite of s1->node->axes[i]
> > >  					 */
> > >  					s2->node->axes[l2] = opposite(seed, s1->node->axes[i]);
> > 
> > I believe it is better to delete the comment completely as it does not give
> > any extra insight over the c code.
> 
> I suggest to keep it. Coverity reports potential COPY_PASTE_ERROR issue
> in here. This comment tell us Coverity gave us a false positive warning.

I see, make sense.

FWIW,
Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com>

> 
> > 
> > >  					change++;
> > > -- 
> > > 2.14.4
> > > 
> > > --
> > > To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> > > the body of a message to majordomo@vger.kernel.org
> > > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Hal Rosenstock Aug. 6, 2018, 6:08 p.m. UTC | #4
On 8/6/2018 10:34 AM, Honggang LI wrote:
> From: Honggang Li <honli@redhat.com>
> 
> Signed-off-by: Honggang Li <honli@redhat.com>

Thanks. Applied.

-- Hal
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox series

Patch

diff --git a/opensm/osm_mesh.c b/opensm/osm_mesh.c
index 8f84e53d..073a21e5 100644
--- a/opensm/osm_mesh.c
+++ b/opensm/osm_mesh.c
@@ -1038,7 +1038,7 @@  static void make_geometry(lash_t *p_lash, int sw)
 
 				if (!s2->node->axes[l2]) {
 					/*
-					 * set axis to opposite of s1->axes[i]
+					 * set axis to opposite of s1->node->axes[i]
 					 */
 					s2->node->axes[l2] = opposite(seed, s1->node->axes[i]);
 					change++;