Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Dec 2016 18:41:05 -0600
From:      Ravi Pokala <rpokala@mac.com>
To:        Alexander Motin <mav@FreeBSD.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r310782 - head/sys/cam/ctl
Message-ID:  <18B83785-95E0-42B1-B359-72C94C2E5D0D@panasas.com>
In-Reply-To: <201612291808.uBTI84k1029032@repo.freebsd.org>
References:  <201612291808.uBTI84k1029032@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi Alexander,

Wouldn't it be better to put the cast directly in the definition of CTL_SOFTC()? That puts the cast in a single place, and anything that calls CTL_SOFTC() will expect a (struct ctl_softc *) anyway.

Thanks, and happy holidays!

-Ravi (rpokala@)

-----Original Message-----
> From: <owner-src-committers@freebsd.org> on behalf of Alexander Motin <mav@FreeBSD.org>
> Date: 2016-12-29, Thursday at 12:08
> To: <src-committers@freebsd.org>, <svn-src-all@freebsd.org>, <svn-src-head@freebsd.org>
> Subject: svn commit: r310782 - head/sys/cam/ctl
> 
> Author: mav
> Date: Thu Dec 29 18:08:04 2016
> New Revision: 310782
> URL: https://svnweb.freebsd.org/changeset/base/310782
> 
> Log:
>   Fix build with enabled debug after r310778.
>   
>   MFC after:	2 weeks
> 
> Modified:
>   head/sys/cam/ctl/ctl.c
> 
> Modified: head/sys/cam/ctl/ctl.c
> ==============================================================================
> --- head/sys/cam/ctl/ctl.c	Thu Dec 29 17:31:38 2016	(r310781)
> +++ head/sys/cam/ctl/ctl.c	Thu Dec 29 18:08:04 2016	(r310782)
> @@ -12519,7 +12519,7 @@ ctl_datamove(union ctl_io *io)
>  {
>  	void (*fe_datamove)(union ctl_io *io);
>  
> -	mtx_assert(&CTL_SOFTC(io)->ctl_lock, MA_NOTOWNED);
> +	mtx_assert(&((struct ctl_softc *)CTL_SOFTC(io))->ctl_lock, MA_NOTOWNED);
>  
>  	CTL_DEBUG_PRINT(("ctl_datamove\n"));
>  
> @@ -13012,7 +13012,7 @@ static void
>  ctl_datamove_remote(union ctl_io *io)
>  {
>  
> -	mtx_assert(&CTL_SOFTC(io)->ctl_lock, MA_NOTOWNED);
> +	mtx_assert(&((struct ctl_softc *)CTL_SOFTC(io))->ctl_lock, MA_NOTOWNED);
>  
>  	if (io->io_hdr.flags & CTL_FLAG_FAILOVER) {
>  		ctl_failover_io(io, /*have_lock*/ 0);






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?18B83785-95E0-42B1-B359-72C94C2E5D0D>