Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756590AbWKVTDl (ORCPT ); Wed, 22 Nov 2006 14:03:41 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756494AbWKVTDk (ORCPT ); Wed, 22 Nov 2006 14:03:40 -0500 Received: from bay0-omc1-s7.bay0.hotmail.com ([65.54.246.79]:49376 "EHLO bay0-omc1-s7.bay0.hotmail.com") by vger.kernel.org with ESMTP id S1756590AbWKVTDj (ORCPT ); Wed, 22 Nov 2006 14:03:39 -0500 Message-ID: X-Originating-IP: [80.178.108.101] X-Originating-Email: [yan_952@hotmail.com] From: "Burman Yan" To: linux-kernel@vger.kernel.org Cc: trivial@kernel.org Subject: [PATCH 2.6.19-rc6] kernel core: replace kmalloc+memset with kzalloc Date: Wed, 22 Nov 2006 21:03:37 +0200 Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_6d28_4752_6360" X-OriginalArrivalTime: 22 Nov 2006 19:03:39.0230 (UTC) FILETIME=[EB698FE0:01C70E68] Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 6754 Lines: 126 This is a multi-part message in MIME format. ------=_NextPart_000_6d28_4752_6360 Content-Type: text/plain; format=flowed Hi. This trivial patch replaces kmalloc+memset with kzalloc in a few kernel core sources. Regards Yan Burman _________________________________________________________________ FREE pop-up blocking with the new MSN Toolbar - get it now! http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/ ------=_NextPart_000_6d28_4752_6360 Content-Type: application/octet-stream; name="kzalloc_kernel.patch" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="kzalloc_kernel.patch" UmVwbGFjZSBrbWFsbG9jK21lbXNldCB3aXRoIGt6YWxsb2MgCgpTaWduZWQt b2ZmLWJ5OiBZYW4gQnVybWFuIDx5YW5fOTUyQGhvdG1haWwuY29tPgoKZGlm ZiAtcnVicCBsaW51eC0yLjYuMTktcmM1X29yaWcvaXBjL3N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9zdHJ1Y3QpLCBHRlBf S0VSTkVMKTsKIAlpZiAoIXZtYSkKIAkJZ290byBlcnJvcl9nZXR0aW5nX3Zt YTsKIAotCW1lbXNldCh2bWEsIDAsIHNpemVvZigqdm1hKSk7CiAJSU5JVF9M SVNUX0hFQUQoJnZtYS0+YW5vbl92bWFfbm9kZSk7CiAJYXRvbWljX3NldCgm dm1hLT52bV91c2FnZSwgMSk7CiAJaWYgKGZpbGUpCg== ------=_NextPart_000_6d28_4752_6360-- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/