From nobody@FreeBSD.org  Fri Nov 11 13:56:09 2011
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 688DA106566B
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 11 Nov 2011 13:56:09 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 5847F8FC16
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 11 Nov 2011 13:56:09 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id pABDu9gl084275
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 11 Nov 2011 13:56:09 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id pABDu9ot084273;
	Fri, 11 Nov 2011 13:56:09 GMT
	(envelope-from nobody)
Message-Id: <201111111356.pABDu9ot084273@red.freebsd.org>
Date: Fri, 11 Nov 2011 13:56:09 GMT
From: Alexander Best <arundel@FreeBSD.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [ath] functions with return type HAL_BOOL (might) return HAL_STATUS
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         162475
>Category:       kern
>Synopsis:       [ath] functions with return type HAL_BOOL (might) return HAL_STATUS
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bschmidt
>State:          patched
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Nov 11 14:00:30 UTC 2011
>Closed-Date:    
>Last-Modified:  Wed Dec 21 20:10:09 UTC 2011
>Originator:     Alexander Best
>Release:        10.0-CURRENT
>Organization:
>Environment:
FreeBSD otaku 10.0-CURRENT FreeBSD 10.0-CURRENT #0: Thu Nov 10 14:01:26 CET 2011     arundel@otaku:/usr/obj/usr/git-freebsd-head/sys/ARUNDEL  amd64
>Description:
in the following functions:

dev/ath/ath_hal/ar5416/ar5416_misc.c:ar5416SetDecompMask()
dev/ath/ath_hal/ar5212/ar5212_misc.c:ar5212SetDecompMask()

the return type is HAL_BOOL, yet it's possible that the return type is HAL_STATUS. Clang(1) complains about this via the -Wconversion warning.

cheers.
alex
>How-To-Repeat:

>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-wireless 
Responsible-Changed-By: arundel 
Responsible-Changed-When: Fri Nov 11 14:00:34 UTC 2011 
Responsible-Changed-Why:  
Over to maintainer(s). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=162475 

From: Alexander Best <arundel@freebsd.org>
To: bug-followup@freebsd.org
Cc:  
Subject: Re: kern/162475: [ath] functions with return type HAL_BOOL (might) return HAL_STATUS
Date: Sat, 3 Dec 2011 13:55:34 +0000

 here are two more examples:
 
 /usr/subversion-src/sys/dev/an/if_an.c:800:41: warning: implicit conversion from enumeration type 'enum ieee80211_phytype' to different enumeration type 'enum ieee80211_phymode' [-Wconversion]
                 mword = ieee80211_rate2media(NULL, r, IEEE80211_T_DS);
                         ~~~~~~~~~~~~~~~~~~~~          ^~~~~~~~~~~~~~
 /usr/subversion-src/sys/dev/an/if_an.c:3302:30: warning: implicit conversion from enumeration type 'enum ieee80211_phytype' to different enumeration type 'enum ieee80211_phymode' [-Wconversion]
                 status.an_current_tx_rate, IEEE80211_T_DS);
                                            ^~~~~~~~~~~~~~
 2 warnings generated.
 
 ..also fixing these would make the entire kernel code "-Wconversion"-clean, i believe.
 
 cheers.
 alex
State-Changed-From-To: open->patched 
State-Changed-By: arundel 
State-Changed-When: Tue Dec 20 12:42:34 UTC 2011 
State-Changed-Why:  
the warnings in my followup mail (dated Sat, 3 Dec 2011), were fixed in r228621         
by bschmidt@. 

the HAL_BOOL/HAL_STATUS issue has not been fixed, yet. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=162475 
Responsible-Changed-From-To: freebsd-wireless->adrian 
Responsible-Changed-By: arundel 
Responsible-Changed-When: Tue Dec 20 12:43:56 UTC 2011 
Responsible-Changed-Why:  
Over to adrian@ who volunteered to fix the HAL_BOOL/HAL_STATUS warnings. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=162475 
Responsible-Changed-From-To: adrian->bschmidt 
Responsible-Changed-By: arundel 
Responsible-Changed-When: Wed Dec 21 20:09:21 UTC 2011 
Responsible-Changed-Why:  
over to bschmidt@ as mfc reminder. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=162475 

From: Alexander Best <arundel@freebsd.org>
To: bug-followup@freebsd.org
Cc: Dimitry Andric <dim@freebsd.org>,
	Bernhard Schmidt <bschmidt@freebsd.org>
Subject: Re: kern/162475: [ath] functions with return type HAL_BOOL (might) return HAL_STATUS
Date: Wed, 21 Dec 2011 20:01:08 +0000

 the HAL_BOOL/HAL_STATUS issue was fixed by dim@ in r228786.
 
 so r228621 and r228786 should probably be MFC'ed together. that's why i added
 dim@ and bschmidt@ in CC.
 
 cheers.
 alex
>Unformatted:
