Date: Thu, 13 Mar 2014 22:13:41 +0000 From: "Meyer, Conrad" <conrad.meyer@isilon.com> To: John Baldwin <jhb@freebsd.org>, "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org> Subject: RE: [PATCH] x86/mca.c: malloc with correct pointer type Message-ID: <A3CAF0E84A34A540B4C74454358E003F1292E8FF@MX103CL02.corp.emc.com> In-Reply-To: <201403131357.07665.jhb@freebsd.org> References: <1394728529-22495-1-git-send-email-conrad.meyer@isilon.com>, <201403131357.07665.jhb@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
> From: John Baldwin [jhb@freebsd.org] > Sent: Thursday, March 13, 2014 10:57 AM > To: freebsd-hackers@freebsd.org > Cc: Meyer, Conrad > Subject: Re: [PATCH] x86/mca.c: malloc with correct pointer type > > > - cmc_state = malloc((mp_maxid + 1) * sizeof(struct cmc_state **), > > - M_MCA, M_WAITOK); > > + cmc_state = malloc((mp_maxid + 1) * sizeof(*cmc_state), M_MCA, > > + M_WAITOK); > > for (i = 0; i <= mp_maxid; i++) > > cmc_state[i] = malloc(sizeof(struct cmc_state) * mca_banks, > > M_MCA, M_WAITOK | M_ZERO); > > I would rather do 'struct cmc_state *' as I think it is clearer to read, but > the change is correct. Thanks! > > -- > John Baldwin Sounds fine to me. Thanks, Conrad
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?A3CAF0E84A34A540B4C74454358E003F1292E8FF>
