From patchwork Tue Feb 8 14:59:49 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akinobu Mita X-Patchwork-Id: 82349 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 6F879B70FF for ; Wed, 9 Feb 2011 01:59:30 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754726Ab1BHO7P (ORCPT ); Tue, 8 Feb 2011 09:59:15 -0500 Received: from mail-gy0-f174.google.com ([209.85.160.174]:62800 "EHLO mail-gy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753937Ab1BHO7C (ORCPT ); Tue, 8 Feb 2011 09:59:02 -0500 Received: by gyb11 with SMTP id 11so2244671gyb.19 for ; Tue, 08 Feb 2011 06:59:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:cc:subject:date:message-id:x-mailer; bh=GthPctkfzFXUnUbf/RlgYYRhPsL8jBUH5Kz1oZXEXyk=; b=SBc04YZAqfLnH8IiGitTI8+VzhapYjx3IGTCux+jkNeLrMu9YzTYHbyBUCkfxNBseb xAgsz9vZvSTp1KG/nItYBBpl//o+YOpOiQnJeorzuHMdwaMmP/L7OEGuYP4APL/fTdw+ gxF7qQoLU4ZiAH+GzgRDdbQdBha/pZK8NL3Q0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=ZiraVuLiE9h4ixG+DkR75LYdZYDrfNqkHlnL3q8j4EJb+u1BQ9keNKjIMpukhSYEWr 7KelW7/goX+sHUt8+0TprGtbgWKymXcMVxBSTWczph/MvyBXHuYHfJzxrBZlpKaKGyWt jvahwrrIEMqOmEVlIbvimMfEMQDrdRvUVfPFU= Received: by 10.90.55.15 with SMTP id d15mr22075aga.137.1297177141902; Tue, 08 Feb 2011 06:59:01 -0800 (PST) Received: from localhost.localdomain (p8025-adsao01yokonib2-acca.kanagawa.ocn.ne.jp [219.161.30.25]) by mx.google.com with ESMTPS id 35sm7169718ano.31.2011.02.08.06.58.59 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 08 Feb 2011 06:59:01 -0800 (PST) From: Akinobu Mita To: sparclinux@vger.kernel.org Cc: Akinobu Mita , "David S. Miller" Subject: [PATCH] sparc: use bitmap_set() Date: Tue, 8 Feb 2011 23:59:49 +0900 Message-Id: <1297177190-1423-1-git-send-email-akinobu.mita@gmail.com> X-Mailer: git-send-email 1.7.4 Sender: sparclinux-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: sparclinux@vger.kernel.org Use bitmap_set() instead of calling __set_bit() each bit. Signed-off-by: Akinobu Mita Cc: "David S. Miller" Cc: sparclinux@vger.kernel.org --- arch/sparc/lib/bitext.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/sparc/lib/bitext.c b/arch/sparc/lib/bitext.c index 764b3eb..48d00e7 100644 --- a/arch/sparc/lib/bitext.c +++ b/arch/sparc/lib/bitext.c @@ -10,7 +10,7 @@ */ #include -#include +#include #include @@ -80,8 +80,7 @@ int bit_map_string_get(struct bit_map *t, int len, int align) while (test_bit(offset + i, t->map) == 0) { i++; if (i == len) { - for (i = 0; i < len; i++) - __set_bit(offset + i, t->map); + bitmap_set(t->map, offset, len); if (offset == t->first_free) t->first_free = find_next_zero_bit (t->map, t->size,