/* ipath_format_hwerrors - format hardware error messages for display @hwerrs hardware errors bit vector @hwerrmsgs hardware error descriptions @nhwerrmsgs number of hwerrmsgs @msg message buffer @msgl message buffer length  */
void ipath_format_hwerrors(u64 hwerrs, const struct ipath_hwerror_msgs *hwerrmsgs, size_t nhwerrmsgs, char *msg, size_t msgl)
/* ipath_format_hwerrors - format hardware error messages for display @hwerrs hardware errors bit vector @hwerrmsgs hardware error descriptions @nhwerrmsgs number of hwerrmsgs @msg message buffer @msgl message buffer length  */
void ipath_format_hwerrors(u64 hwerrs, const struct ipath_hwerror_msgs *hwerrmsgs, size_t nhwerrmsgs, char *msg, size_t msgl)
{
	int i;
	const int glen =
	    sizeof(ipath_generic_hwerror_msgs) /
	    sizeof(ipath_generic_hwerror_msgs[0]);
	for (i=0; i<glen; i++) {
		if (hwerrs & ipath_generic_hwerror_msgs[i].mask) {
			ipath_format_hwmsg(msg, msgl,
					   ipath_generic_hwerror_msgs[i].msg);
		}
	}
	for (i=0; i<nhwerrmsgs; i++) {
		if (hwerrs & hwerrmsgs[i].mask) {
			ipath_format_hwmsg(msg, msgl, hwerrmsgs[i].msg);
		}
	}
}