From owner-freebsd-hackers@FreeBSD.ORG Sat Jun 11 16:40:15 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 831351065674 for ; Sat, 11 Jun 2011 16:40:15 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 1D4028FC0A for ; Sat, 11 Jun 2011 16:40:14 +0000 (UTC) Received: by vws18 with SMTP id 18so4103349vws.13 for ; Sat, 11 Jun 2011 09:40:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:date:message-id:subject:from:to:cc :content-type; bh=WStpY8F6Q2IwYbiBo2aQvFxHegu/0UO3dnleG4syUoc=; b=D3XnHPzSkTh62oYrq/NPGy7BoUw64zdyMWy6/RALJh+N01cv0mF0XCMK0pJmPyyk+6 W0Nu7cAj8k/0jXKNUpHXcdFhdHOCb3k0ElXe5VnHu0ttmkOEfku99jCMYvCV/5lEul74 3W4qmx4s+HdTV32ajiQHraF627Cm1r6Gek0qU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type; b=rwcQlWfRxGmlESlrpOXeJgHYYwd6FGTxlS9sIzKjBF7hHkp+W64gyFczi09ijnfhoV wOEsqj6LtT2KsUCZPzryJgJ33jo/sniwS2NcV8y5iNg8RDs7YgeZ91ttXU4frUanteBP SXNeTqXZmuYFHLwcZdlvZwWEf1tXfhXdNw/TY= MIME-Version: 1.0 Received: by 10.52.98.231 with SMTP id el7mr4762011vdb.229.1307810413997; Sat, 11 Jun 2011 09:40:13 -0700 (PDT) Received: by 10.220.189.202 with HTTP; Sat, 11 Jun 2011 09:40:13 -0700 (PDT) Date: Sat, 11 Jun 2011 09:40:13 -0700 Message-ID: From: Garrett Cooper To: sam@FreeBSD.org Content-Type: multipart/mixed; boundary=20cf307ca26428ef7504a5725723 Cc: freebsd-hackers@freebsd.org Subject: [PATCH] do bswap32 properly with safe(4) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jun 2011 16:40:15 -0000 --20cf307ca26428ef7504a5725723 Content-Type: text/plain; charset=ISO-8859-1 Hi Sam! For some odd reason every time I compile GENERIC (i.e. don't try to compile safe(4) as a standalone module, and I don't compile it with my standard test kernel) I run into an error where the compiler complains about the result from bswap32 in safe(4) being unused. This patch fixes that warning so the module compiles properly and more importantly does the network to host conversions which may be required for the driver under some architectures. Thanks! -Garrett --20cf307ca26428ef7504a5725723 Content-Type: text/x-patch; charset=US-ASCII; name="sys-safe-do-bswap32.patch" Content-Disposition: attachment; filename="sys-safe-do-bswap32.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_gossid5q0 SW5kZXg6IHN5cy9kZXYvc2FmZS9zYWZlLmMKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gc3lzL2Rldi9zYWZlL3Nh ZmUuYwkocmV2aXNpb24gMjIyOTgwKQorKysgc3lzL2Rldi9zYWZlL3NhZmUuYwkod29ya2luZyBj b3B5KQpAQCAtMTU4MCw5ICsxNTgwLDEyIEBACiAJCQkJICogU0hBLTEgSUNWJ3MgYXJlIGJ5dGUt c3dhcHBlZDsgZml4ICdlbSB1cAogCQkJCSAqIGJlZm9yZSBjb3B5IHRoZW0gdG8gdGhlaXIgZGVz dGluYXRpb24uCiAJCQkJICovCi0JCQkJYnN3YXAzMihyZS0+cmVfc2FzdGF0ZS5zYV9zYXZlZF9p bmRpZ2VzdFswXSk7Ci0JCQkJYnN3YXA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