From owner-freebsd-current@FreeBSD.ORG Sun Jan 16 20:42:14 2011 Return-Path: Delivered-To: current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 84058106564A for ; Sun, 16 Jan 2011 20:42:14 +0000 (UTC) (envelope-from imb@protected-networks.net) Received: from sarah.protected-networks.net (sarah.protected-networks.net [IPv6:2001:470:1f07:4e1::1]) by mx1.freebsd.org (Postfix) with ESMTP id 4C2338FC18 for ; Sun, 16 Jan 2011 20:42:14 +0000 (UTC) Received: from toshi.auburn.protected-networks.net (toshi.auburn.protected-networks.net [202.12.127.84]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "Iain Butler", Issuer "RSA Class 2 Personal CA" (verified OK)) (Authenticated sender: imb@protected-networks.net) by sarah.protected-networks.net (Postfix) with ESMTPSA id 5D0E86105 for ; Sun, 16 Jan 2011 15:42:13 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=protected-networks.net; s=200705; t=1295210533; bh=2oeyGVEYJavqXpkj0BRxPkNRARQCAuE7Grm/mWVwkU8=; h=Message-ID:Date:From:MIME-Version:To:Subject:Content-Type; b=jNItNDx723NC0HsYFm8OzOGI5UNXSsLB793rb4rsWeeqQftZ4kYPKrdhTuAa6uIdr S79iTkgbBGPpal6om9ZTEZFxuci1Id61wwvww/jFGajcF4N6tR1bQCVsbJQpzeU DomainKey-Signature: a=rsa-sha1; s=200509; d=protected-networks.net; c=nofws; q=dns; h=message-id:date:from:user-agent:mime-version:to:subject: x-enigmail-version:openpgp:content-type; b=kJPsmkFTpJFv0EaH/7rFMqFCT3xYT9W51qJNVrFsHtuCCaz5SNP1s6hmy14oramuG 2Fx8UT9k1jcDCdGVcUfTPW4OO79LQ6uD1k0hsY5l/35EKvbqNFyALQW9xWqywN/ Message-ID: <4D335823.3060109@protected-networks.net> Date: Sun, 16 Jan 2011 15:42:11 -0500 From: Michael Butler User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.2.13) Gecko/20101217 Thunderbird/3.1.7 MIME-Version: 1.0 To: current@FreeBSD.org X-Enigmail-Version: 1.1.2 OpenPGP: id=0442D492 Content-Type: multipart/mixed; boundary="------------030203080106080105020304" Cc: Subject: cosmetic nit in mmc.c X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Jan 2011 20:42:14 -0000 This is a multi-part message in MIME format. --------------030203080106080105020304 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit In the process of making the sdhci driver work with my laptop, I noted a cosmetic issue where the SD card's serial number is not correctly reported (it's always zero). Possible patch attached, imb --------------030203080106080105020304 Content-Type: text/x-diff; name="mmc_get_bits.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="mmc_get_bits.patch" Index: mmc.c =================================================================== --- mmc.c (revision 217480) +++ mmc.c (working copy) @@ -749,7 +749,10 @@ uint32_t retval = bits[i] >> shift; if (size + shift > 32) retval |= bits[i - 1] << (32 - shift); - return (retval & ((1 << size) - 1)); + if (size < 32) + return (retval & ((1 << size) - 1)); + else + return (retval); } static void --------------030203080106080105020304--