lib/crypto/mpi/mpi-sub-ui.c

Source file repositories/reference/linux-study-clean/lib/crypto/mpi/mpi-sub-ui.c

File Facts

System
Linux kernel
Corpus path
lib/crypto/mpi/mpi-sub-ui.c
Extension
.c
Size
2349 bytes
Lines
81
Domain
Kernel Services
Bucket
lib
Inferred role
Kernel Services: exported/initcall integration point
Status
integration implementation candidate

Why This File Exists

Shared kernel service surface used by multiple subsystems, including helpers, cryptography, virtualization support, and async I/O infrastructure.

Dependency Surface

Detected Declarations

Annotated Snippet

if (u->nlimbs == 1 && u->d[0] < vval) {
			w->d[0] = vval - u->d[0];
			w->nlimbs = 1;
			w->sign = 1;
		} else {
			mpihelp_sub_1(w->d, u->d, u->nlimbs, (mpi_limb_t) vval);
			/* Size can decrease with at most one limb. */
			w->nlimbs = (u->nlimbs - (w->d[u->nlimbs - 1] == 0));
			w->sign = 0;
		}
	}

	mpi_normalize(w);
	return 0;
}
EXPORT_SYMBOL_GPL(mpi_sub_ui);

Annotation

Implementation Notes