---
name: "hsi_alloc_msg"
section: "9"
platform: "linux"
package: "linux-manual-3.16"
version: "3.16.56-1+deb8u1"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/hsi_alloc_msg"
---

# hsi\_alloc\_msg(9)

Allocate an HSI message

## NAME

hsi\_alloc\_msg - Allocate an HSI message

## SYNOPSIS

**struct hsi\_msg \* hsi\_alloc\_msg(unsigned int** *nents***, gfp\_t** *flags***);**

## ARGUMENTS

*nents*

Number of memory entries

*flags*

Kernel allocation flags

## DESCRIPTION

nents can be 0. This mainly makes sense for read transfer. In that case, HSI drivers will call the complete callback when there is data to be read without consuming it.

Return NULL on failure or a pointer to an hsi\_msg on success.

## COPYRIGHT
